Added division example to show error callback.
Refactoring and bug fixes.