-Moved demo logic into its own script file.