Fixed some comments, replaced and exit call with a throw