Added best and worst view collection logic
added AttachViewSelectionEventHandlers function