Fix copyright, reorganize code in root