Removed superfluous definition of contains?/2. Switched out the cond to a case.
Refactored the case clause into a simple or clause. Added indentation.