Updated pull request based on good ideas expressed by dominikkrejcik
in https://github.com/airbnb/rendr/pull/95