support building multiple configs
build fixes for unuseds and other minor issues