Improved docs and minor bug fixes