Fixing some of the errors, still work in progress.