Added options and improved functionality for demo generation.