Refactored wrt checkstyle and findbugs