Misc. fixes.

* Code: Fixes minor bugs.
* Evaluations: Sort attributes by 'Order'.