Added copyright headers and documentation