Learning to modularize my javascript into separate files