Add @throws docblocks to many functions