finished up index.js functionality and tests
removed legacy files
refactored everything to be sync