enhancements in prettify

* enhance handling of strings in prettify
* handle correctly cases for '[]' and '{}' in prettify