Reg refactor take2 ian