Adding CLI testrunner, and re-organising functions to make locations clearer