Heavy refactoring of nearly everything. Not yet in a usable state.