some cleanup of unused functions