Script functional, but still not nice and neat.