Add data structs, and caches directories

Split roles into smaller classes to decrease coupling.