duration can be a quotation mark wrapped number

remove useless variables & support setting duration value as a
quotation mark wrapped number (such as ‘2000’)