Refactor the god object
More refactoring
Add a generic transform calculation
Set a null transform matrix
Fix compile error