Code maintenance and license headers

Move code maintenance scripts to folder, include and use new script to update all python files with a license file header. Changed the license to Apache 2.