addViewController added, some bug fixed, code cleaned