tidy up some scripts