Expression evaluation using case classes