Cleanup; refactoring transform