lots of stuff and cleanup