move deserialization logic to getTaskRaw
move key deserialization to lower function
add reverseTaskSlice
add GetNextSelected
just get the last index instead of reversing
add accessor methods for Pending and Selected tasks