Removed technical debt due to nested if/elseif

Removed nested if/elseif statements where possible. Added in $.errorHandler.message to allow the user to override the default message format. Drastically cut down on character count by creating one message.