Added a new config system

Sent this as a pr, still needs some testing