Performance experiment

Simplified the entire engine, making it significantly easier for the Swift optimiser to optimise. Little impact on debug build performance, but 98% improvement in optimised build performance.