Stopped using exceptions, closes #172.