Merge with oliver's stuff
Added sorting functionality and sectioned datasource.

(was a bit drunk, sorry if code is sloppy / comments are bad)