Edited some variables
Refactored