More exception handling. Fixed some typos/bugs.