Cleaned up demo code