Cleanups here and there
A few more cleanups and removal of phpunit dependency.