Add documentation for on_init

Closes #20