Snaebjorn

Added tests for and implemented, error throwing and handling.