remove old code
Refactor some variable names