Improving readability
Improving readability by inverting some conditions and decreasing the identation.