Proper Exception handling

closes #3