This is not a proper clean up. It does not bring the code up to the current state of the rest of the codebase. However, the module now compiles again.