Cleans up the script a little
First stab at documentation