Merge changes I2ead6a77,I6bf2204a

* changes:
  Remove ResolveVariables()
  Make ConfigWriter simpler