Updated docs, added CLI params, various cosmetic bugfixes.