Removed unnecessary temp variables.