Refactored code based on Franco and Dan's comments

Indent `when` one step more than `case`.