Cleaned up some comments, added additional exceptions, and added some error checking in array growth/shrinking.