First stages of script, still broken working on fix