Merged code. Added some semicolons