v1.7

Starting to incorporate script into functions