better js file structure