Initial commit. Script almost working.