$ 0 0 *MERGE* Fix various bugs and compiler warnings. All tests now passing on linux, mac, and windows. More testing needed, though. (tags: qrf)