Refactored Trivia Java