improve/refactor spoiler-alert, add debug mode to discount