Added missing math dependency, and updated a line that wasn't compiling.