core: reduce the use of lists

Change-Id: I20ea91d7020596b4bf49b620e4a789a3a94eaf5f
Reported-By: Antoni Segura Puimedon <asegurap@redhat.com>
Signed-off-by: Alon Bar-Lev <alonbl@redhat.com>