resolve some warnings for deprecated api
remove rubbish codes