A bit of refactoring, separation of js infiles
A bit of refactoring, separation of js in files