code tidy up.