Added missing variable declaration and semicolons.