Fixes #3 and #4.

I'm not completely happy with using -1 as a placeholder. Also you can specify negative numbers on the command line, but they don't break anything.