Fixing syntax styling and misplaced Exception