initial commit of refactor; deleted lots of code