code cleanup on demo page