misc refactoring
misc refactoring

lian774739140/connect,tanveer12332/connect,llwanghong/connect,khirayama/connect,RickyDan/connect,senchalabs/connect,davehorton/drachtio,RoseTHERESA/connect,austincitylimits/connect,khalerc/connect,mi2oon/connect,qitianchan/connect,keenwon/connect,liuwei9413/connect,brianloveswords/connect,wghust/connect,mi2oon/connect,dkfiresky/connect,behind2/connect,chinazhaghai/connect,gtomitsuka/connect