clean up tests; prettify src code