Changed automation to run from an input file

Changed so the automation runs from an input n csv format.
Moved the automation code into a class in the main project but it's
still run from a seperate project.