refactored everything, got ready to implement the non-prototype version of thrive