Cleaned up a bunch of unnecessary code