Engine cleanup

This branch just cleans up a bunch of obsolete code and tests.

Enjoy!