Rework of demo page, internal variables renamed, fixed small bug