Fixed many issues, but not yet all.