This is just a code reorganization to avoid making it difficult to find things as we migrate more file to TypeScript.