Finished and commented script