A bunch of fixes

- fixed unit tests so they match Flash behavior
- fixed Vector sorting so it conforms to the new unit tests
- a couple of other nits