Massive restructure, only slightly broken!