Very close to being finished - only marking sorted seems to be broken