Refactoring.
Move evaluation functions to another file.