move buffer list sorting logic to service and improve it a bit