cleaned up demo app code