Revert "Needs reverting"

This reverts commit a8958074d276488d66de2e44da7026c917d9d007.
Filepath now global variable
Filepath global object now used for saving files