Add copyright header and tests