Major refactoring

Removed a lot of stuff, made everything vastly more simplified.