prettify stuff using expressions

Better to be using expressions rather than raw if/else since those cost indentation.