Added copyright, compiler warnings.