Also, additional clean up including capitalization of other case statement enums and utilizing booleans instead of ints for true/false check.
Also, additional clean up. Basically, cherry-picked commit #5f98c7c5 for MR 2204 comments.