Use a headed linked list to avoid traversing the list for append.
Convert the shaders list in a hash to speedup search.
Destroy hash tables properly.