Fixed redundancies, got rid of uneccessary variable.