Modified a few things, see extended description

Added file output of data, to allow for some processing to be done

Added main file to show how software can be used.