Move the hand evaluation logic to a separate class; minor optimizations