Some fixes/cleanup