General cleanup. Reduce mess detector noise, move phpunit config, add test environments.