Move JS to separate file
Consolidate pony/jockey updating code