misc fixes/cleanup