config cleanup, removing tail call recursion because c# isn't playing nice with it