Fixed some solution mistakes, added better commenting