Working on illegal value exceptions.
Throwing errors on bad input.
Adding more error handling/comments.