added checkstyle and fixed code style