Checkstyled and some minor refactor