Can you correct coding standards here? `} else {` on one line, spaces around ternary operators, etc?