checkstyle fixes. code structure cleanup