InvalidArgumentExceptions

Moved to throwing exceptions instead of returning false in a number of
places.
fix for case insensitivity