Move code out of redesign (again)