Initial commit of the working script, with a minimal set of features