Refactored get, post, and put handling

This includes adding support for before and after callbacks
for post, put, and delete, and an after callback for get.

This also implements #6 and corrects #12.