Refactor after review
- pattern matching for Option instead of using isDefined
Replaced custom string generation method with one from sml-common