Improve logging message, remove duplicated methods and apply JBoss code style