added the ability to remove items and re-index the array
added some comments