More robust config parser and preliminary support for custom properties.