Testing mocks
Middle-ware logic tests
Refactored out the key-store
point at right directory