more tests and fixed codenarc violations