Significantly simplify main.cc, rc.cc

Revamp how runtime configs are used through out codebase.