Code Clean Up:
- Remove StackTrace in catch block section
- Create String Constants for repeated string literals
- Move the string literal at the start for string comparisons
- Combined the nested if conditions
- Create a local variable for common string literals

Reviewer: Mae Isabelle Turiana