Fixed all variable names and added documentation to function eval