adding sort, filters, other cleanup