Cleaned up the math explanation a little. Still needs work.Added comments.