Major refactoring. Things are very broken.