Added exceptions. Everybody loves exceptions!