Refactored winner function to not have low level implementation code

@mnewsome, let me know what you think about this.