refactored js files.  added setup.js