Add License to all the files. Some legacy code has been commented