Several improvements to script

Some improvements to the script, update to Github API 3, release under the GPL