Refactr codes