Removed some unnecessary if statements