Took out multiple useless lines and fixed logic