Added trailing semicolons and fixed other coding issues.