some cleanup of old code