code style fixes. Include missing tests.