Checkstyle and Metrics fixes