Test cleanup

Lots of dead code and some inflexibilities wrt. running tests from / or
t/.