refactoring and checkstyle on core.
fixed .gitignore.