Changed code style, added missing semicolons.