better structure for javascript files