Working storage manager

Implemented the full storage manager