Major config rewrite
Changed config loading to dependency injection