Allow stdin, fix JSON parsing, doc tweaks

Closes #486, #368