Move error_handler.rb to error.rb, and small refactoring
YARD :heart:, closes #4