Add documentation
Fix crash when going past end of the list