A pass at getting tests to run cleanly and some Sonar / IntelliJ analysis