Debug code.
Added sample_order to locations object to respect simple dependency relationships.