cleanup and fixes for PRIS-108