Various fixes to prepare for transparency