cleanups
small change logic
rewrites to nose
fix export