Simplify tests

* Make them directly executable again
* Move common stuff (md5, parameters) to helper
* Never import *
* General clean up