Some tweaks, memory leaks still need fixing and debugging code needs removing, or maybe toggeling