Major refactor, tailors specifically to Tempest