Refactored exceptions. refs #406