Cleaned up javascript file structures