Removed unneeded if statements and fixed some comments