Added array order functionality.
Some more tweaks.
Reverted everything else.