changing from if to case statement. removing unused imports. cleanup formatting. Converting to diamond syntax.