Added a callback and process_callback option, with tests.