Removed unnecessary semicolons and made some other minor changes.