clean up and fixes