Cleanup, improved docs, corrections