[#19] Replaced case with function clauses.