The great tidy up

Lots of unnecessary code removed