Code rector - using library functions instead of repetative code