Remove lots of unneccassary code