Snaebjorn

Created tests for, and implemented, error handling and throwing.