Refactored format_seconds and format_seconds_short