refactor and rewrite of all code. Added protections against start and stop. Consolidated start/stop funcitonality into one file