Refactored code, added quotes for variables.