Partial restructuring of js and css for better organization