Indentation cleanup. Move long if .. elsif chain to switch case