Some testing improvements

Please have a look at the commit messages!

The CLI is not implemented yet but will be this weekend!