Compact way of modifying variables with commands