Huge commit

First stage of real progress from refactor. Set up working state
machine and trimmed away unnessecary files from the project. Should be
leaner, meaner, and easier to work with.
Continuing refactor commit
Continuing refactor commit