* refine init function, test=develop * add tests, test=develop * remove extern, which may cause symbol error in gcc-4.8, test=develop