Fixed some of the many mistakes