Fixed many of the problems