Deck editor. Simplify code