Make our utility functions static
Rename utility functions
Small whitespace fix
Allow an error code to be returned by a callback function