Make fields final where possible. Reintroduce end of line comment markers to avoid reformatting into unreadable format. Replace HashSet per command instance with String to reduce memory footprint. Tweak Javadoc wording to represent what we actually expect. Reorder methods. See #2640 Original pull request: #2644