bugfix and documentation
cleanup and documentation