Removed unused variables and methods. Added copyright.