Remove useless variable and also correct some style