moving js into dirs
removed unused config
refactor out common