Commenting, error handling, refactoring
Added an assert to the test.