Got rid of unnecessary variables