code cleanup for demo