Thomas' Changeset (from a year ago)

@thomdixon made some improvements to the codebase a long time ago, but it got merged into unstable, not master. Later, unstable got deleted, and the commits were lost. I asked Thomas about it, and he still had the changes on his machine, so I reworked the commits to work on the latest version of the code.