unify code style, dlete unecessary variables