Added code for application demos.