Unwanted variables and #defines removed

Unwanted variables and #defines removed