Respect `is_24h` argument in `format_time`
Completely restructure JavaScript

Yay objects! :D

(boo callbacks D:)