Fixed bug; slightly refactored ArgumentError error raising