reorganizing and consolidating JS files