Fixed most things that were wrong.