Clean up ziggurat code