refactor bits
fixing up the per instance caching and unit tests