Split the eval logic into a "private" function.