updated true to "1" to fit documentation typing
updated set_error_handler to use a closure in throwing error exceptions
removed unused static methods
refactored code for findCommit