Added information about empty simple collection
Removed some unused code
Cleaned up some issues identified by code analysis