Cleanup. And trying some loop fixes.