Added free_val and initial tests.