Refactored to use 2d transform instead of 3d transform