Refactor flipX/flipY behaviour.