A few little changes

Added a new exception and cleaned up the spec file / code a bit.