Minor fixes and code cleanup

Added selection of logs by collection, logging of deleted item
collection, and added comments.