Fixed string code bug.
Added priority orders.