Allow for a callback to be specified

- Closes #212