[init] re-factor for standalone usability.