Cleanup code
Add ViewportTransform function