rebased and fixed sime checkstyle issues