move common config items to top
fix minor demo errors
fix minor demo errors