Massive delete and refactor

It's still broken, unfortunately. :-(