Move implementation into cpp files
Add missing copyright headers