fix
lots of cleanups and fixes