analytics and other cleanup