Reworked the engine to speed up the process