Refactored custom module class hanlder