Bit of code reused clean up.