Changed data format.
Minor tweaks to code.