Small changes made to code structure