Parenthesed everything for logic. Also fixed loops. Silly if elseif association