Added forced sort to make sure sort order doesn't change when filter criteria changes and changed selectAnyNote so it selects one based on the sort order (i.e. either last or first in list).