Refactored the code a bit more. Added some more Javascript files to cluster functions more logically.