fix the getClass() issue for IntelliJ and some refactoring
minor chages
minor changes
Use commons.lang and some utils refactory