Started breaking out javascript into small library