Edited syntax and changed few lines that were unnecessary.