cleanup and tidy