Minor fixes, more clear exception, check for array key before attempting to delete.
Incremental update before upgrade.