Switched from using callbacks to delegation

Implemented delegation for all the server requests instead of using
callbacks.