Cleanup, add template stores, add environment class.