cleanup and some work