code style && resolve some warning