added cache schema and an activity schema
bunch of random stuff to streamline the various functions
some small stuff