Commented most of the updated mathematical methods.