Initial commit, tested and working script