A bit of housekeeping

Trimmed off about 300 lines of unneccessary code