Cleaned up TriviaFactory code

Added descriptive comments and removed obsolete comments.
Cleaned up the code so it conforms to coding standards.