[WIP] Unit tests and new swagger specification

This PR is there if someone feels like going forward with this so it doesn't stay unoticed on my fork ;-)