Follow Fork coding standards

There are some more places with wrongly placed else or elseif statements. More info can be found here: https://github.com/forkcms/coding-standards