Miscellaneous fix/rework