temple map fixes and optimizations
clean up