Init Codes

Hi, pls review the codes, thx.