Added partial support for build configurations and added some diagnostic command line flags.