Refactored implementation

* Now using objects instead of strings for more reliable handling and
an improved public api
* Added support for different drivers for both storage and metadata
* Moved logic from controllers to services (need to add unit tests
though)