More changes to fix most of the issues.