Mike refactor table sort



<!---
@huboard:{"milestone_order":126.0,"order":3.375,"custom_state":"ready"}
-->

Yes, the values are used so it is initialised to save checks, but empty strings means the table is not sorted by default