Standardize callback and cleanup code.
Update error param names
Merge pull request #1 from hybridgroup/standardize-callback

Standardize callback