save point

periodic save.  Tidy up code