fixed flow error
Updated docs, minor bugfixes