Add callback support and result tracking.

Adds callback registry, and calls all callbacks after appropriate
points. Adds result object that gets populated.

Closes #3. Closes #4.