Correct typo + val rename + change enum pattern matching