Added copyright information and fixed some comments