major cleanup; leave mostly osx-centric stuff