Moved Config and Functions

Moved the config and functions to the config file