Made minor fixes and improvements