Merge pull request #2 from cornytrace/master

Several small improvements