Initial commit of script. Works a bit