a little api refactoring, documentation, example cleanup
compiled example