Removed a lot of unused variables
Fixed previous commit