cleans demo code a bit