Something about the logic of this function bothers me.  It both gets the labels but also deletes them.  Is there no scenario where you might just want to get the labels?  I would suggest breaking these up into two functions.  Thoughts?