tidy up code.housekeeping