Changed logic to use arrays for applying cover images. Various cleanup of extra code from various places