Minor style changes
Use ternary operator