Added comments and more asserts to the test