Move #rename and #swap to mixin