CLean up code