some cleanup of unused code