clean up warnings, remove obsolete deallocs