some more code movement, plus fix the nan-causing bug
Merge branch 'master' of github.com:kersny/binary