Making the code cleaner