Added copyright headers
Added some javadocs