Added error handling, renamed a variable to make more sense.
0.3.0