First working script, more or less.