Fix module definition and dependency injection