Huge API & Storage layer refactoring

Storage-layer is still in-complete!