Make functions more readable

Change the way tests are added to testcases, to improve readability.