some refactoring

* Moved file names to the front
* Moved generating a submission file to a separate script