Sort notes into lists
Various fixes