Callback functions added and documentation updated