Changed todo.php to use functions following comments on the given code from the new exercise