code style consistency and test coverage improvements