Refactor translateAndScale and customFade