Cleaning up code implementation