misc fixes/cleanup.