Add filename getter and clone to config.

- Also refactors current getters for config.
Fix useless temp var.