Changed Logic and Syntax - Chris

Fixed syntax errors, and fixed logic errors.