Making code more regular