Added explanation for a non-obvious function call.
Added some more teacher comments
added explanation for why we want to convert to a matrix
Fixed comment formatting for consistency