Some beautyfication.
Bug fix.
Remove unused variable.