a bit refactoring and dumping the unused classes