demo cleanup
minor bug fixes