Fixed overlay on facet select and clean up code