cleaning up and fixes