Fixed various typos and occurrences of incorrect syntax. IT BUILDS WITHOUT ERRORS, SO IT MUST WORK!!!