Script is completely functional, now to tweak it