Repository: obsidian-tasks-group/obsidian-tasks
Pull request #2607 (2024-01-21 23:49:42)

refactor: Rearrange src/ and tests/ so structure is easier to see
<!--- Provide a general summary of your changes in the Title above -->

# Description

**This is a suggestion that I would appreciate swift feedback on.**

I've been struggling a bit when scrolling from `src/` to `tests/` and back because there were so many files at the top levels of both.

Also, I had previously grouped together some files under `src/` but not made the same changes in `tests/`.

Other advantages include:

- It's easier to run all the tests for particular areas of code, like `Query/Group/`, or `Task/`.
- A bunch of files from the top level that interface with Obsidian are now together in `Obsidian/`.

### Things I haven't moved

- I haven't moved `DateAbbreviations` as @mathisgauthey has been working on it
- I haven't moved some `Renderer`/`Layout` files as @ilandikov may have stached changes, and we can talk about this on Tuesday.

### Things I can considering moving more.

It's quite handy to have these in `src/Task/`:

- `Recurrence.ts`
- `Task.ts`
- `TaskDependency.ts`
- `TaskLocation.ts`
- `Urgency.ts`

I also moved the Status code to `src/Statuses/` - I'm considering one more step, of moving them to `src/Task/Statuses`.


## Motivation and Context

<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here. -->

See above, but in brief:

- Easier selective running of tests _via_ right-clicking on a folder and saying 'Run Tests'
- A lot less clutter at the top level of `src/` and `tests/`

## How has this been tested?

<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, tests ran to see how -->
<!--- your change affects other areas of the code, etc. -->

By running the tests.

All changes made by WebStorm automated refactoring.

## Screenshots (if appropriate)

#### Before-and-after - `src/`


![image](https://github.com/obsidian-tasks-group/obsidian-tasks/assets/4840096/75dc740d-39cf-44ab-8893-67adc6aa00c8)

#### Before-and-after - `tests/`

![image](https://github.com/obsidian-tasks-group/obsidian-tasks/assets/4840096/c7471e5a-0b27-4368-8738-9704bba0042b)


## Types of changes

<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->

Internal changes:

- [x] **Refactor** (prefix: `refactor` - non-breaking change which only improves the design or structure of existing code, and making no changes to its external behaviour)

## Checklist

<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->

- [x] My code follows the code style of this project and passes `yarn run lint`.
- [x] My change requires a change to the documentation.
- [ ] I have [updated the documentation](https://publish.obsidian.md/tasks-contributing/Documentation/About+Documentation) accordingly.
- [x] My change has adequate [Unit Test coverage](https://publish.obsidian.md/tasks-contributing/Testing/About+Testing).

## Terms

<!--
By submitting this pull request, you must agree to follow our
[contributing guide](https://publish.obsidian.md/tasks-contributing) and
[Code of Conduct](https://github.com/obsidian-tasks-group/obsidian-tasks/blob/main/CODE_OF_CONDUCT.md).
Put an x in the boxes to confirm you agree.
-->

- [x] My contribution follow this project's [contributing guide](https://publish.obsidian.md/tasks-contributing)
- [x] I agree to follow this project's [Code of Conduct](https://github.com/obsidian-tasks-group/obsidian-tasks/blob/main/CODE_OF_CONDUCT.md)



Patch:
diff --git a/contributing/Code/How do I add a new field to the Task class.md b/contributing/Code/How do I add a new field to the Task class.md
index b851c5b1..3fdfa0fe 100644
--- a/contributing/Code/How do I add a new field to the Task class.md
+++ b/contributing/Code/How do I add a new field to the Task class.md
@@ -17,7 +17,7 @@ For example, It's fine to have a first release of a feature without `sort by` an
 
 ### Store the field
 
-- Add the field to [src/Task.ts](https://github.com/obsidian-tasks-group/obsidian-tasks/blob/main/src/Task.ts)
+- Add the field to [src/Task/Task.ts](https://github.com/obsidian-tasks-group/obsidian-tasks/blob/main/src/Task/Task.ts)
 
 ### Read and write the field
 
@@ -25,11 +25,11 @@ For example, It's fine to have a first release of a feature without `sort by` an
 
 ### Detect edits to field value
 
-- In [tests/Task.test.ts](https://github.com/obsidian-tasks-group/obsidian-tasks/blob/main/tests/Task.test.ts):
+- In [tests/Task/Task.test.ts](https://github.com/obsidian-tasks-group/obsidian-tasks/blob/main/tests/Task/Task.test.ts):
   - Add a new failing block to the `'identicalTo'` section.
   - Here is an existing example: ['should check path'](https://github.com/obsidian-tasks-group/obsidian-tasks/blob/5b0831c36a80c4cde2d64a6cd281bb4b51e9a142/tests/Task.test.ts#L834-L840).
-- In [src/Task.ts](https://github.com/obsidian-tasks-group/obsidian-tasks/blob/main/src/Task.ts), update `Task.identicalTo()`:
-  - Once you have a failing test in [tests/Task.test.ts](https://github.com/obsidian-tasks-group/obsidian-tasks/blob/main/tests/Task.test.ts), implement the check for changed value of your new field in `Task.identicalTo()`.
+- In [src/Task/Task.ts](https://github.com/obsidian-tasks-group/obsidian-tasks/blob/main/src/Task/Task.ts), update `Task.identicalTo()`:
+  - Once you have a failing test in [tests/Task/Task.test.ts](https://github.com/obsidian-tasks-group/obsidian-tasks/blob/main/tests/Task/Task.test.ts), implement the check for changed value of your new field in `Task.identicalTo()`.
   - This important method is used to detect whether any edits of any kind have been made to a task, to detect whether task block results need to be updated.
   - Here is the code for the method as of 2022-11-12:
     - [Task.identicalTo() in 5b0831c36a80c4cde2d64a6cd281bb4b51e9a142](https://github.com/obsidian-tasks-group/obsidian-tasks/blob/5b0831c36a80c4cde2d64a6cd281bb4b51e9a142/src/Task.ts#L732-L802)
@@ -70,4 +70,4 @@ Can be added in later releases
   - Update `dates.md`
 - Handling invalid dates
   - Add the new field to all sections of [resources/sample_vaults/Tasks-Demo/Manual Testing/Invalid Dates.md](https://github.com/obsidian-tasks-group/obsidian-tasks/blob/main/resources/sample_vaults/Tasks-Demo/Manual%20Testing/Invalid%20Dates.md)
-  - Update the query in the 'invalid dates' section of [docs/queries/filters.md](https://github.com/obsidian-tasks-group/obsidian-tasks/blob/main/docs/queries/filters.md)
+  - Update the query in the 'invalid dates' section of [docs/Queries/Filters.md](https://github.com/obsidian-tasks-group/obsidian-tasks/blob/main/docs/Queries/Filters.md)
diff --git a/contributing/Code/How do I add a new task filter.md b/contributing/Code/How do I add a new task filter.md
index 30868d78..db737dc2 100644
--- a/contributing/Code/How do I add a new task filter.md
+++ b/contributing/Code/How do I add a new task filter.md
@@ -27,7 +27,7 @@ For help on writing and running the tests, see [[About Testing]]
 - Add to [tests/Query/Filter](https://github.com/obsidian-tasks-group/obsidian-tasks/tree/main/tests/Query/Filter) a new test file.
   - This should focus on testing whether or not individual Task objects, with carefully selected sample date, match the filter.
   - Think about edge cases.
-- Add the new instruction(s) to  'Query parsing' test in  [tests/Query.test.ts](https://github.com/obsidian-tasks-group/obsidian-tasks/blob/main/tests/Query.test.ts)
+- Add the new instruction(s) to  'Query parsing' test in  [tests/Query/Query.test.ts](https://github.com/obsidian-tasks-group/obsidian-tasks/blob/main/tests/Query/Query.test.ts)
   - This verifies that the new filter instruction has been correctly wired in to the Query class.
 
 ## Update doc/
diff --git a/contributing/Code/How does Tasks handle status changes.md b/contributing/Code/How does Tasks handle status changes.md
index 6909ecce..88c19aeb 100644
--- a/contributing/Code/How does Tasks handle status changes.md
+++ b/contributing/Code/How does Tasks handle status changes.md
@@ -5,8 +5,8 @@ You can toggle a task‘s status by:
 | #   | User mechanism                                                                                | Source-code location                                                                                                                                                                                                                                | Toggle behaviour                                                                                                                                                                                                                                                            |
 | --- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
 | 1   | using the **command** (may be bound to a hotkey).                                             | [src/Commands/ToggleDone.ts](https://github.com/obsidian-tasks-group/obsidian-tasks/blob/main/src/Commands/ToggleDone.ts)                                                                                                                           | toggles the line directly where the cursor is in the file inside Obsidian's vault.                                                                                                                                                                                          |
-| 2   | clicking on a checkbox of an **inline task** in **Live Preview**.                             | [src/LivePreviewExtension.ts](https://github.com/obsidian-tasks-group/obsidian-tasks/blob/main/src/LivePreviewExtension.ts)                                                                                                                         | toggles the line directly where the checkbox is on the "document" of CodeMirror (the library that Obsidian uses to show text on screen).<br>That, in turn, updates the file in Obsidian's Vault.                                                                            |
-| 3   | clicking on a checkbox of an **inline task** in **Reading mode**.                             | uses a checkbox created by `renderTaskLine()` in [src/TaskLineRenderer](https://github.com/obsidian-tasks-group/obsidian-tasks/blob/main/src/TaskLineRenderer.ts).<br>There, the checkbox gets a click event handler.                               | The click event listener of 3. and 4. uses `replaceTaskWithTasks()` in [src/File.ts](https://github.com/obsidian-tasks-group/obsidian-tasks/blob/main/src/File.ts).<br>That, in turn, updates the file in Obsidian‘s Vault (like 1, but it needs to find the correct line). |
+| 2   | clicking on a checkbox of an **inline task** in **Live Preview**.                             | [src/Obsidian/LivePreviewExtension.ts](https://github.com/obsidian-tasks-group/obsidian-tasks/blob/main/src/Obsidian/LivePreviewExtension.ts)                                                                                                                         | toggles the line directly where the checkbox is on the "document" of CodeMirror (the library that Obsidian uses to show text on screen).<br>That, in turn, updates the file in Obsidian's Vault.                                                                            |
+| 3   | clicking on a checkbox of an **inline task** in **Reading mode**.                             | uses a checkbox created by `renderTaskLine()` in [src/Renderer/TaskLineRenderer](https://github.com/obsidian-tasks-group/obsidian-tasks/blob/main/src/Renderer/TaskLineRenderer.ts).<br>There, the checkbox gets a click event handler.                               | The click event listener of 3. and 4. uses `replaceTaskWithTasks()` in [src/Obsidian/File.ts](https://github.com/obsidian-tasks-group/obsidian-tasks/blob/main/src/Obsidian/File.ts).<br>That, in turn, updates the file in Obsidian‘s Vault (like 1, but it needs to find the correct line). |
 | 4   | clicking on a checkbox in **query results** (same for **Reading mode** and **Live Preview**). | As 3                                                                                                                                                                                                                                                | As 3                                                                                                                                                                                                                                                                        |
 | 5   | via 'Create or edit task' **modal** Status dropdown                                           | [src/ui/EditTask.svelte](https://github.com/obsidian-tasks-group/obsidian-tasks/blob/main/src/ui/EditTask.svelte) and [src/Commands/CreateOrEdit.ts](https://github.com/obsidian-tasks-group/obsidian-tasks/blob/main/src/Commands/CreateOrEdit.ts) | Not yet implemented: see [#1590](https://github.com/obsidian-tasks-group/obsidian-tasks/issues/1590)                                                                                                                                                                        |
 
diff --git a/src/Api/createTaskLineModal.ts b/src/Api/createTaskLineModal.ts
index ec364430..4b59147e 100644
--- a/src/Api/createTaskLineModal.ts
+++ b/src/Api/createTaskLineModal.ts
@@ -1,5 +1,5 @@
 import type { App } from 'obsidian';
-import type { Task } from '../Task';
+import type { Task } from '../Task/Task';
 
 /**
  * Interface to remove all references to {TaskModal} in this file.
diff --git a/src/Api/createTaskLineModalHelper.ts b/src/Api/createTaskLineModalHelper.ts
index 2d8bc87a..4da46c2e 100644
--- a/src/Api/createTaskLineModalHelper.ts
+++ b/src/Api/createTaskLineModalHelper.ts
@@ -1,7 +1,7 @@
 import type { App } from 'obsidian';
-import type { Task } from '../Task';
+import type { Task } from '../Task/Task';
 import { taskFromLine } from '../Commands/CreateOrEditTaskParser';
-import { TaskModal } from '../TaskModal';
+import { TaskModal } from '../Obsidian/TaskModal';
 import type { ITaskModal, taskModalFactory } from './createTaskLineModal';
 
 /**
diff --git a/src/Commands/CreateOrEdit.ts b/src/Commands/CreateOrEdit.ts
index 515f93e5..6a487540 100644
--- a/src/Commands/CreateOrEdit.ts
+++ b/src/Commands/CreateOrEdit.ts
@@ -1,7 +1,7 @@
 import { App, Editor, MarkdownView, View } from 'obsidian';
-import { TaskModal } from '../TaskModal';
-import type { Task } from '../Task';
-import { DateFallback } from '../DateFallback';
+import { TaskModal } from '../Obsidian/TaskModal';
+import type { Task } from '../Task/Task';
+import { DateFallback } from '../Task/DateFallback';
 import { taskFromLine } from './CreateOrEditTaskParser';
 
 export const createOrEdit = (checking: boolean, editor: Editor, view: View, app: App, allTasks: Task[]) => {
diff --git a/src/Commands/CreateOrEditTaskParser.ts b/src/Commands/CreateOrEditTaskParser.ts
index 4eaffad6..3d74076b 100644
--- a/src/Commands/CreateOrEditTaskParser.ts
+++ b/src/Commands/CreateOrEditTaskParser.ts
@@ -1,8 +1,8 @@
-import { Status } from '../Status';
-import { Priority, Task, TaskRegularExpressions } from '../Task';
-import { DateFallback } from '../DateFallback';
-import { StatusRegistry } from '../StatusRegistry';
-import { TaskLocation } from '../TaskLocation';
+import { Status } from '../Statuses/Status';
+import { Priority, Task, TaskRegularExpressions } from '../Task/Task';
+import { DateFallback } from '../Task/DateFallback';
+import { StatusRegistry } from '../Statuses/StatusRegistry';
+import { TaskLocation } from '../Task/TaskLocation';
 import { getSettings } from '../Config/Settings';
 import { GlobalFilter } from '../Config/GlobalFilter';
 
diff --git a/src/Commands/ToggleDone.ts b/src/Commands/ToggleDone.ts
index 62c99431..93d0a3c7 100644
--- a/src/Commands/ToggleDone.ts
+++ b/src/Commands/ToggleDone.ts
@@ -1,8 +1,8 @@
 import { Editor, type EditorPosition, type MarkdownFileInfo, MarkdownView } from 'obsidian';
-import { StatusRegistry } from '../StatusRegistry';
+import { StatusRegistry } from '../Statuses/StatusRegistry';
 
-import { Task, TaskRegularExpressions } from '../Task';
-import { TaskLocation } from '../TaskLocation';
+import { Task, TaskRegularExpressions } from '../Task/Task';
+import { TaskLocation } from '../Task/TaskLocation';
 
 export const toggleDone = (checking: boolean, editor: Editor, view: MarkdownView | MarkdownFileInfo) => {
     if (checking) {
diff --git a/src/Config/CustomStatusModal.ts b/src/Config/CustomStatusModal.ts
index 696ee5be..eec32a49 100644
--- a/src/Config/CustomStatusModal.ts
+++ b/src/Config/CustomStatusModal.ts
@@ -1,8 +1,8 @@
 import { Modal, Notice, Setting, TextComponent } from 'obsidian';
 import type { Plugin } from 'obsidian';
-import { StatusConfiguration, StatusType } from '../StatusConfiguration';
-import { StatusValidator } from '../StatusValidator';
-import { Status } from '../Status';
+import { StatusConfiguration, StatusType } from '../Statuses/StatusConfiguration';
+import { StatusValidator } from '../Statuses/StatusValidator';
+import { Status } from '../Statuses/Status';
 
 const validator = new StatusValidator();
 
diff --git a/src/Config/Settings.ts b/src/Config/Settings.ts
index d34c285e..89b8022c 100644
--- a/src/Config/Settings.ts
+++ b/src/Config/Settings.ts
@@ -5,8 +5,8 @@ import {
 } from '../Suggestor/Suggestor';
 import { DEFAULT_SYMBOLS } from '../TaskSerializer/DefaultTaskSerializer';
 import { DATAVIEW_SYMBOLS } from '../TaskSerializer/DataviewTaskSerializer';
-import { StatusConfiguration } from '../StatusConfiguration';
-import { Status } from '../Status';
+import { StatusConfiguration } from '../Statuses/StatusConfiguration';
+import { Status } from '../Statuses/Status';
 import { DefaultTaskSerializer, type TaskSerializer } from '../TaskSerializer';
 import type { SuggestionBuilder } from '../Suggestor';
 import type { LogOptions } from '../lib/logging';
diff --git a/src/Config/SettingsTab.ts b/src/Config/SettingsTab.ts
index a7fed2a8..951c4c5c 100644
--- a/src/Config/SettingsTab.ts
+++ b/src/Config/SettingsTab.ts
@@ -1,10 +1,10 @@
 import { Notice, PluginSettingTab, Setting, debounce } from 'obsidian';
-import { StatusConfiguration, StatusType } from '../StatusConfiguration';
+import { StatusConfiguration, StatusType } from '../Statuses/StatusConfiguration';
 import type TasksPlugin from '../main';
-import { StatusRegistry } from '../StatusRegistry';
-import { Status } from '../Status';
-import type { StatusCollection } from '../StatusCollection';
-import { createStatusRegistryReport } from '../StatusRegistryReport';
+import { StatusRegistry } from '../Statuses/StatusRegistry';
+import { Status } from '../Statuses/Status';
+import type { StatusCollection } from '../Statuses/StatusCollection';
+import { createStatusRegistryReport } from '../Statuses/StatusRegistryReport';
 import * as Themes from './Themes';
 import { type HeadingState, TASK_FORMATS } from './Settings';
 import { getSettings, isFeatureEnabled, updateGeneralSetting, updateSettings } from './Settings';
diff --git a/src/Config/StatusSettings.ts b/src/Config/StatusSettings.ts
index a66c4ee4..0f333342 100644
--- a/src/Config/StatusSettings.ts
+++ b/src/Config/StatusSettings.ts
@@ -1,7 +1,7 @@
-import type { StatusConfiguration } from '../StatusConfiguration';
-import type { StatusRegistry } from '../StatusRegistry';
-import { Status } from '../Status';
-import type { StatusCollection } from '../StatusCollection';
+import type { StatusConfiguration } from '../Statuses/StatusConfiguration';
+import type { StatusRegistry } from '../Statuses/StatusRegistry';
+import { Status } from '../Statuses/Status';
+import type { StatusCollection } from '../Statuses/StatusCollection';
 
 /**
  * Class for encapsulating the settings that control custom statuses.
diff --git a/src/Config/Themes/AnuPpuccinThemeCollection.ts b/src/Config/Themes/AnuPpuccinThemeCollection.ts
index bc1d9636..44f2f673 100644
--- a/src/Config/Themes/AnuPpuccinThemeCollection.ts
+++ b/src/Config/Themes/AnuPpuccinThemeCollection.ts
@@ -1,4 +1,4 @@
-import type { StatusCollection } from '../../StatusCollection';
+import type { StatusCollection } from '../../Statuses/StatusCollection';
 
 /**
  * Status supported by the AnuPpuccin theme. {@link https://github.com/AnubisNekhet/AnuPpuccin}
diff --git a/src/Config/Themes/AuraThemeCollection.ts b/src/Config/Themes/AuraThemeCollection.ts
index b5239594..d086a9ac 100644
--- a/src/Config/Themes/AuraThemeCollection.ts
+++ b/src/Config/Themes/AuraThemeCollection.ts
@@ -1,4 +1,4 @@
-import type { StatusCollection } from '../../StatusCollection';
+import type { StatusCollection } from '../../Statuses/StatusCollection';
 
 /**
  * Status supported by the Aura theme. {@link https://github.com/ashwinjadhav818/obsidian-aura}
diff --git a/src/Config/Themes/EbullientworksThemeCollection.ts b/src/Config/Themes/EbullientworksThemeCollection.ts
index 1172a000..265b7471 100644
--- a/src/Config/Themes/EbullientworksThemeCollection.ts
+++ b/src/Config/Themes/EbullientworksThemeCollection.ts
@@ -1,4 +1,4 @@
-import type { StatusCollection } from '../../StatusCollection';
+import type { StatusCollection } from '../../Statuses/StatusCollection';
 
 /**
  * Status supported by the Ebullientworks theme. {@link https://github.com/ebullient/obsidian-theme-ebullientworks}
diff --git a/src/Config/Themes/ITSThemeCollection.ts b/src/Config/Themes/ITSThemeCollection.ts
index fe49a279..1e8b381d 100644
--- a/src/Config/Themes/ITSThemeCollection.ts
+++ b/src/Config/Themes/ITSThemeCollection.ts
@@ -1,4 +1,4 @@
-import type { StatusCollection } from '../../StatusCollection';
+import type { StatusCollection } from '../../Statuses/StatusCollection';
 
 /**
  * Status supported by the ITS theme. {@link https://github.com/SlRvb/Obsidian--ITS-Theme}
diff --git a/src/Config/Themes/LYTModeThemeCollection.ts b/src/Config/Themes/LYTModeThemeCollection.ts
index 6958d3f5..1d09dce8 100644
--- a/src/Config/Themes/LYTModeThemeCollection.ts
+++ b/src/Config/Themes/LYTModeThemeCollection.ts
@@ -1,4 +1,4 @@
-import type { StatusCollection } from '../../StatusCollection';
+import type { StatusCollection } from '../../Statuses/StatusCollection';
 
 /**
  * Status supported by the LYT Mode theme. {@link https://github.com/nickmilo/LYT-Mode}
diff --git a/src/Config/Themes/MinimalThemeCollection.ts b/src/Config/Themes/MinimalThemeCollection.ts
index 2b474038..c509e41e 100644
--- a/src/Config/Themes/MinimalThemeCollection.ts
+++ b/src/Config/Themes/MinimalThemeCollection.ts
@@ -1,4 +1,4 @@
-import type { StatusCollection } from '../../StatusCollection';
+import type { StatusCollection } from '../../Statuses/StatusCollection';
 
 /**
  * Status supported by the Minimal theme. {@link https://github.com/kepano/obsidian-minimal}
diff --git a/src/Config/Themes/ThingsThemeCollection.ts b/src/Config/Themes/ThingsThemeCollection.ts
index 13f372cc..c182b7ea 100644
--- a/src/Config/Themes/ThingsThemeCollection.ts
+++ b/src/Config/Themes/ThingsThemeCollection.ts
@@ -1,4 +1,4 @@
-import type { StatusCollection } from '../../StatusCollection';
+import type { StatusCollection } from '../../Statuses/StatusCollection';
 
 /**
  * Status supported by the Things theme. {@link https://github.com/colineckert/obsidian-things}
diff --git a/src/IQuery.ts b/src/IQuery.ts
index c2faff6c..7ba77334 100644
--- a/src/IQuery.ts
+++ b/src/IQuery.ts
@@ -1,7 +1,7 @@
 import type { TaskLayoutOptions } from './Layout/TaskLayoutOptions';
-import type { QueryLayoutOptions } from './QueryLayoutOptions';
-import type { Task } from './Task';
-import type { Grouper } from './Query/Grouper';
+import type { QueryLayoutOptions } from './Layout/QueryLayoutOptions';
+import type { Task } from './Task/Task';
+import type { Grouper } from './Query/Group/Grouper';
 import type { QueryResult } from './Query/QueryResult';
 
 /**
diff --git a/src/QueryLayoutOptions.ts b/src/Layout/QueryLayoutOptions.ts
similarity index 100%
rename from src/QueryLayoutOptions.ts
rename to src/Layout/QueryLayoutOptions.ts
diff --git a/src/TaskLayout.ts b/src/Layout/TaskLayout.ts
similarity index 98%
rename from src/TaskLayout.ts
rename to src/Layout/TaskLayout.ts
index d9ab608d..d33ffa87 100644
--- a/src/TaskLayout.ts
+++ b/src/Layout/TaskLayout.ts
@@ -1,4 +1,4 @@
-import { TaskLayoutOptions } from './Layout/TaskLayoutOptions';
+import { TaskLayoutOptions } from './TaskLayoutOptions';
 import { QueryLayoutOptions } from './QueryLayoutOptions';
 
 export type TaskLayoutComponent =
diff --git a/src/Layout/TaskLayoutOptions.ts b/src/Layout/TaskLayoutOptions.ts
index 7eeaf4fc..f773aab5 100644
--- a/src/Layout/TaskLayoutOptions.ts
+++ b/src/Layout/TaskLayoutOptions.ts
@@ -1,4 +1,4 @@
-import { type TaskLayoutComponent, taskLayoutComponents } from '../TaskLayout';
+import { type TaskLayoutComponent, taskLayoutComponents } from './TaskLayout';
 
 /**
  * Various rendering options of tasks in a query.
diff --git a/src/Cache.ts b/src/Obsidian/Cache.ts
similarity index 98%
rename from src/Cache.ts
rename to src/Obsidian/Cache.ts
index a2f54842..3b8b345b 100644
--- a/src/Cache.ts
+++ b/src/Obsidian/Cache.ts
@@ -3,14 +3,13 @@ import type { CachedMetadata, EventRef } from 'obsidian';
 import type { HeadingCache, ListItemCache, SectionCache } from 'obsidian';
 import { Mutex } from 'async-mutex';
 
-import { Task } from './Task';
+import { Task } from '../Task/Task';
+import { DateFallback } from '../Task/DateFallback';
+import { getSettings } from '../Config/Settings';
+import { Lazy } from '../lib/Lazy';
+import { TaskLocation } from '../Task/TaskLocation';
+import { logging } from '../lib/logging';
 import type { TasksEvents } from './TasksEvents';
-import { DateFallback } from './DateFallback';
-import { getSettings } from './Config/Settings';
-import { Lazy } from './lib/Lazy';
-import { TaskLocation } from './TaskLocation';
-// import { logging } from './lib/logging';
-import { logging } from './lib/logging';
 
 export enum State {
     Cold = 'Cold',
diff --git a/src/File.ts b/src/Obsidian/File.ts
similarity index 98%
rename from src/File.ts
rename to src/Obsidian/File.ts
index 66353c14..6530a661 100644
--- a/src/File.ts
+++ b/src/Obsidian/File.ts
@@ -1,9 +1,9 @@
 import { type ListItemCache, MetadataCache, Notice, TFile, Vault, Workspace } from 'obsidian';
-import { GlobalFilter } from './Config/GlobalFilter';
-import { type MockListItemCache, type MockTask, saveMockDataForTesting } from './lib/MockDataCreator';
-import type { Task } from './Task';
-import { logging } from './lib/logging';
-import { logEndOfTaskEdit, logStartOfTaskEdit } from './lib/LogTasksHelper';
+import { GlobalFilter } from '../Config/GlobalFilter';
+import { type MockListItemCache, type MockTask, saveMockDataForTesting } from '../lib/MockDataCreator';
+import type { Task } from '../Task/Task';
+import { logging } from '../lib/logging';
+import { logEndOfTaskEdit, logStartOfTaskEdit } from '../lib/LogTasksHelper';
 
 let metadataCache: MetadataCache | undefined;
 let vault: Vault | undefined;
diff --git a/src/InlineRenderer.ts b/src/Obsidian/InlineRenderer.ts
similarity index 94%
rename from src/InlineRenderer.ts
rename to src/Obsidian/InlineRenderer.ts
index 2f325c19..143d4c44 100644
--- a/src/InlineRenderer.ts
+++ b/src/Obsidian/InlineRenderer.ts
@@ -1,11 +1,11 @@
 import type { MarkdownPostProcessorContext, Plugin } from 'obsidian';
 import { MarkdownRenderChild } from 'obsidian';
-import { GlobalFilter } from './Config/GlobalFilter';
-import { TaskLayoutOptions } from './Layout/TaskLayoutOptions';
-import { QueryLayoutOptions } from './QueryLayoutOptions';
-import { Task } from './Task';
-import { TaskLineRenderer } from './TaskLineRenderer';
-import { TaskLocation } from './TaskLocation';
+import { GlobalFilter } from '../Config/GlobalFilter';
+import { TaskLayoutOptions } from '../Layout/TaskLayoutOptions';
+import { QueryLayoutOptions } from '../Layout/QueryLayoutOptions';
+import { Task } from '../Task/Task';
+import { TaskLineRenderer } from '../Renderer/TaskLineRenderer';
+import { TaskLocation } from '../Task/TaskLocation';
 
 export class InlineRenderer {
     constructor({ plugin }: { plugin: Plugin }) {
diff --git a/src/LivePreviewExtension.ts b/src/Obsidian/LivePreviewExtension.ts
similarity index 98%
rename from src/LivePreviewExtension.ts
rename to src/Obsidian/LivePreviewExtension.ts
index 1cdea4d1..043264cf 100644
--- a/src/LivePreviewExtension.ts
+++ b/src/Obsidian/LivePreviewExtension.ts
@@ -2,8 +2,8 @@ import { EditorView, ViewPlugin } from '@codemirror/view';
 import type { PluginValue } from '@codemirror/view';
 import { Notice } from 'obsidian';
 
-import { Task } from './Task';
-import { TaskLocation } from './TaskLocation';
+import { Task } from '../Task/Task';
+import { TaskLocation } from '../Task/TaskLocation';
 
 export const newLivePreviewExtension = () => {
     return ViewPlugin.fromClass(LivePreviewExtension);
diff --git a/src/TaskModal.ts b/src/Obsidian/TaskModal.ts
similarity index 90%
rename from src/TaskModal.ts
rename to src/Obsidian/TaskModal.ts
index 6a646944..8eddfc2d 100644
--- a/src/TaskModal.ts
+++ b/src/Obsidian/TaskModal.ts
@@ -1,8 +1,8 @@
 import { App, Modal } from 'obsidian';
-import EditTask from './ui/EditTask.svelte';
-import type { Task } from './Task';
-import { StatusRegistry } from './StatusRegistry';
-import { Status } from './Status';
+import EditTask from '../ui/EditTask.svelte';
+import type { Task } from '../Task/Task';
+import { StatusRegistry } from '../Statuses/StatusRegistry';
+import { Status } from '../Statuses/Status';
 
 export class TaskModal extends Modal {
     public readonly task: Task;
diff --git a/src/TasksEvents.ts b/src/Obsidian/TasksEvents.ts
similarity index 95%
rename from src/TasksEvents.ts
rename to src/Obsidian/TasksEvents.ts
index 514fb86b..88a32569 100644
--- a/src/TasksEvents.ts
+++ b/src/Obsidian/TasksEvents.ts
@@ -1,8 +1,8 @@
 import type { EventRef, Events as ObsidianEvents } from 'obsidian';
 
+import type { Task } from '../Task/Task';
+import { logging } from '../lib/logging';
 import type { State } from './Cache';
-import type { Task } from './Task';
-import { logging } from './lib/logging';
 
 enum Event {
     CacheUpdate = 'obsidian-tasks-plugin:cache-update',
diff --git a/src/Query/Filter/BacklinkField.ts b/src/Query/Filter/BacklinkField.ts
index 410d3557..9177d41b 100644
--- a/src/Query/Filter/BacklinkField.ts
+++ b/src/Query/Filter/BacklinkField.ts
@@ -1,5 +1,5 @@
-import type { Task } from '../../Task';
-import type { GrouperFunction } from '../Grouper';
+import type { Task } from '../../Task/Task';
+import type { GrouperFunction } from '../Group/Grouper';
 import { FilterOrErrorMessage } from './FilterOrErrorMessage';
 import { TextField } from './TextField';
 
diff --git a/src/Query/Filter/BooleanField.ts b/src/Query/Filter/BooleanField.ts
index 9866658e..c20c9cb7 100644
--- a/src/Query/Filter/BooleanField.ts
+++ b/src/Query/Filter/BooleanField.ts
@@ -2,7 +2,7 @@ import { parse as boonParse } from 'boon-js';
 import type { PostfixExpression } from 'boon-js';
 
 import { parseFilter } from '../FilterParser';
-import type { Task } from '../../Task';
+import type { Task } from '../../Task/Task';
 import { Explanation } from '../Explain/Explanation';
 import type { SearchInfo } from '../SearchInfo';
 import { Field } from './Field';
diff --git a/src/Query/Filter/CancelledDateField.ts b/src/Query/Filter/CancelledDateField.ts
index ebf473e8..cfb43fe5 100644
--- a/src/Query/Filter/CancelledDateField.ts
+++ b/src/Query/Filter/CancelledDateField.ts
@@ -1,5 +1,5 @@
 import type { Moment } from 'moment';
-import type { Task } from '../../Task';
+import type { Task } from '../../Task/Task';
 import { DateField } from './DateField';
 
 /**
diff --git a/src/Query/Filter/CreatedDateField.ts b/src/Query/Filter/CreatedDateField.ts
index 5d69e70e..3d9dbaef 100644
--- a/src/Query/Filter/CreatedDateField.ts
+++ b/src/Query/Filter/CreatedDateField.ts
@@ -1,5 +1,5 @@
 import type { Moment } from 'moment';
-import type { Task } from '../../Task';
+import type { Task } from '../../Task/Task';
 import { DateField } from './DateField';
 
 /**
diff --git a/src/Query/Filter/DateField.ts b/src/Query/Filter/DateField.ts
index 45a311a6..949ad25a 100644
--- a/src/Query/Filter/DateField.ts
+++ b/src/Query/Filter/DateField.ts
@@ -1,11 +1,11 @@
 import type { Moment } from 'moment';
 import { DateRange } from '../DateRange';
-import type { Task } from '../../Task';
+import type { Task } from '../../Task/Task';
 import { DateParser } from '../DateParser';
 import { Explanation } from '../Explain/Explanation';
-import type { Comparator } from '../Sorter';
+import type { Comparator } from '../Sort/Sorter';
 import { compareByDate } from '../../lib/DateTools';
-import type { GrouperFunction } from '../Grouper';
+import type { GrouperFunction } from '../Group/Grouper';
 import { TemplatingPluginTools } from '../../lib/TemplatingPluginTools';
 import { Field } from './Field';
 import { Filter, type FilterFunction } from './Filter';
diff --git a/src/Query/Filter/DescriptionField.ts b/src/Query/Filter/DescriptionField.ts
index 1753cc63..e9782a29 100644
--- a/src/Query/Filter/DescriptionField.ts
+++ b/src/Query/Filter/DescriptionField.ts
@@ -1,6 +1,6 @@
 import { GlobalFilter } from '../../Config/GlobalFilter';
-import type { Task } from '../../Task';
-import type { Comparator } from '../Sorter';
+import type { Task } from '../../Task/Task';
+import type { Comparator } from '../Sort/Sorter';
 import { TextField } from './TextField';
 
 /**
diff --git a/src/Query/Filter/DoneDateField.ts b/src/Query/Filter/DoneDateField.ts
index ecfd3f45..6bd5d67b 100644
--- a/src/Query/Filter/DoneDateField.ts
+++ b/src/Query/Filter/DoneDateField.ts
@@ -1,5 +1,5 @@
 import type { Moment } from 'moment';
-import type { Task } from '../../Task';
+import type { Task } from '../../Task/Task';
 import { DateField } from './DateField';
 
 /**
diff --git a/src/Query/Filter/DueDateField.ts b/src/Query/Filter/DueDateField.ts
index a51e2e8a..6d522b31 100644
--- a/src/Query/Filter/DueDateField.ts
+++ b/src/Query/Filter/DueDateField.ts
@@ -1,5 +1,5 @@
 import type { Moment } from 'moment';
-import type { Task } from '../../Task';
+import type { Task } from '../../Task/Task';
 import { DateField } from './DateField';
 
 /**
diff --git a/src/Query/Filter/Field.ts b/src/Query/Filter/Field.ts
index a0c6df8f..9efdb1af 100644
--- a/src/Query/Filter/Field.ts
+++ b/src/Query/Filter/Field.ts
@@ -1,8 +1,8 @@
-import { Sorter } from '../Sorter';
-import type { Comparator } from '../Sorter';
+import { Sorter } from '../Sort/Sorter';
+import type { Comparator } from '../Sort/Sorter';
 import * as RegExpTools from '../../lib/RegExpTools';
-import { Grouper } from '../Grouper';
-import type { GrouperFunction } from '../Grouper';
+import { Grouper } from '../Group/Grouper';
+import type { GrouperFunction } from '../Group/Grouper';
 import type { FilterOrErrorMessage } from './FilterOrErrorMessage';
 
 /**
diff --git a/src/Query/Filter/FilenameField.ts b/src/Query/Filter/FilenameField.ts
index 7fe90a19..3e9c2d51 100644
--- a/src/Query/Filter/FilenameField.ts
+++ b/src/Query/Filter/FilenameField.ts
@@ -1,5 +1,5 @@
-import type { Task } from '../../Task';
-import type { GrouperFunction } from '../Grouper';
+import type { Task } from '../../Task/Task';
+import type { GrouperFunction } from '../Group/Grouper';
 import { TextField } from './TextField';
 
 /** Support the 'filename' search instruction.
diff --git a/src/Query/Filter/Filter.ts b/src/Query/Filter/Filter.ts
index 2e90f43c..6655b717 100644
--- a/src/Query/Filter/Filter.ts
+++ b/src/Query/Filter/Filter.ts
@@ -1,4 +1,4 @@
-import type { Task } from '../../Task';
+import type { Task } from '../../Task/Task';
 import type { Explanation } from '../Explain/Explanation';
 import type { SearchInfo } from '../SearchInfo';
 
diff --git a/src/Query/Filter/FolderField.ts b/src/Query/Filter/FolderField.ts
index fed3faab..e7d70979 100644
--- a/src/Query/Filter/FolderField.ts
+++ b/src/Query/Filter/FolderField.ts
@@ -1,5 +1,5 @@
-import type { Task } from '../../Task';
-import type { GrouperFunction } from '../Grouper';
+import type { Task } from '../../Task/Task';
+import type { GrouperFunction } from '../Group/Grouper';
 import { TextField } from './TextField';
 
 export class FolderField extends TextField {
diff --git a/src/Query/Filter/FunctionField.ts b/src/Query/Filter/FunctionField.ts
index 654c1436..966d35ad 100644
--- a/src/Query/Filter/FunctionField.ts
+++ b/src/Query/Filter/FunctionField.ts
@@ -1,11 +1,11 @@
-import type { Task } from '../../Task';
-import type { GrouperFunction } from '../Grouper';
-import { Grouper } from '../Grouper';
+import type { Task } from '../../Task/Task';
+import type { GrouperFunction } from '../Group/Grouper';
+import { Grouper } from '../Group/Grouper';
 import { Explanation } from '../Explain/Explanation';
 import { TaskExpression, parseAndEvaluateExpression } from '../../Scripting/TaskExpression';
 import type { QueryContext } from '../../Scripting/QueryContext';
 import type { SearchInfo } from '../SearchInfo';
-import { Sorter } from '../Sorter';
+import { Sorter } from '../Sort/Sorter';
 import { compareByDate } from '../../lib/DateTools';
 import { getValueType } from '../../lib/TypeDetection';
 import { Field } from './Field';
diff --git a/src/Query/Filter/HappensDateField.ts b/src/Query/Filter/HappensDateField.ts
index bdbc6b25..1238c36d 100644
--- a/src/Query/Filter/HappensDateField.ts
+++ b/src/Query/Filter/HappensDateField.ts
@@ -1,5 +1,5 @@
 import type { Moment } from 'moment';
-import type { Task } from '../../Task';
+import type { Task } from '../../Task/Task';
 import type { FilterFunction } from './Filter';
 import { FilterInstructions } from './FilterInstructions';
 import type { DateFilterFunction } from './DateField';
diff --git a/src/Query/Filter/HeadingField.ts b/src/Query/Filter/HeadingField.ts
index 57d76ee5..748b7b84 100644
--- a/src/Query/Filter/HeadingField.ts
+++ b/src/Query/Filter/HeadingField.ts
@@ -1,5 +1,5 @@
-import type { GrouperFunction } from '../Grouper';
-import type { Task } from '../../Task';
+import type { GrouperFunction } from '../Group/Grouper';
+import type { Task } from '../../Task/Task';
 import { TextField } from './TextField';
 
 /** Support the 'heading' search instruction.
diff --git a/src/Query/Filter/MultiTextField.ts b/src/Query/Filter/MultiTextField.ts
index 617b6d4e..cbfe6827 100644
--- a/src/Query/Filter/MultiTextField.ts
+++ b/src/Query/Filter/MultiTextField.ts
@@ -1,6 +1,6 @@
-import type { Task } from '../../Task';
+import type { Task } from '../../Task/Task';
 import type { IStringMatcher } from '../Matchers/IStringMatcher';
-import { Grouper } from '../Grouper';
+import { Grouper } from '../Group/Grouper';
 import { TextField } from './TextField';
 import type { FilterFunction } from './Filter';
 
diff --git a/src/Query/Filter/PathField.ts b/src/Query/Filter/PathField.ts
index 48ae0ea9..3da68613 100644
--- a/src/Query/Filter/PathField.ts
+++ b/src/Query/Filter/PathField.ts
@@ -1,5 +1,5 @@
-import type { Task } from '../../Task';
-import type { GrouperFunction } from '../Grouper';
+import type { Task } from '../../Task/Task';
+import type { GrouperFunction } from '../Group/Grouper';
 import { TextField } from './TextField';
 
 /** Support the 'path' search instruction.
diff --git a/src/Query/Filter/PriorityField.ts b/src/Query/Filter/PriorityField.ts
index 6b71c3f7..57a22eec 100644
--- a/src/Query/Filter/PriorityField.ts
+++ b/src/Query/Filter/PriorityField.ts
@@ -1,7 +1,7 @@
-import { Priority, Task } from '../../Task';
+import { Priority, Task } from '../../Task/Task';
 import { Explanation } from '../Explain/Explanation';
-import type { Comparator } from '../Sorter';
-import type { GrouperFunction } from '../Grouper';
+import type { Comparator } from '../Sort/Sorter';
+import type { GrouperFunction } from '../Group/Grouper';
 import { Field } from './Field';
 import { Filter } from './Filter';
 import { FilterOrErrorMessage } from './FilterOrErrorMessage';
diff --git a/src/Query/Filter/RecurrenceField.ts b/src/Query/Filter/RecurrenceField.ts
index 83b18ed8..31415210 100644
--- a/src/Query/Filter/RecurrenceField.ts
+++ b/src/Query/Filter/RecurrenceField.ts
@@ -1,5 +1,5 @@
-import type { Task } from '../../Task';
-import type { GrouperFunction } from '../Grouper';
+import type { Task } from '../../Task/Task';
+import type { GrouperFunction } from '../Group/Grouper';
 import { TextField } from './TextField';
 
 export class RecurrenceField extends TextField {
diff --git a/src/Query/Filter/RecurringField.ts b/src/Query/Filter/RecurringField.ts
index 08057ecf..87ac8a79 100644
--- a/src/Query/Filter/RecurringField.ts
+++ b/src/Query/Filter/RecurringField.ts
@@ -1,6 +1,6 @@
-import type { Task } from '../../Task';
-import type { GrouperFunction } from '../Grouper';
-import type { Comparator } from '../Sorter';
+import type { Task } from '../../Task/Task';
+import type { GrouperFunction } from '../Group/Grouper';
+import type { Comparator } from '../Sort/Sorter';
 import { FilterInstructionsBasedField } from './FilterInstructionsBasedField';
 
 export class RecurringField extends FilterInstructionsBasedField {
diff --git a/src/Query/Filter/RootField.ts b/src/Query/Filter/RootField.ts
index c44d06b8..53a56bbb 100644
--- a/src/Query/Filter/RootField.ts
+++ b/src/Query/Filter/RootField.ts
@@ -1,5 +1,5 @@
-import type { Task } from '../../Task';
-import type { GrouperFunction } from '../Grouper';
+import type { Task } from '../../Task/Task';
+import type { GrouperFunction } from '../Group/Grouper';
 import { TextField } from './TextField';
 
 export class RootField extends TextField {
diff --git a/src/Query/Filter/ScheduledDateField.ts b/src/Query/Filter/ScheduledDateField.ts
index fa9412f7..7c635fb1 100644
--- a/src/Query/Filter/ScheduledDateField.ts
+++ b/src/Query/Filter/ScheduledDateField.ts
@@ -1,5 +1,5 @@
 import type { Moment } from 'moment';
-import type { Task } from '../../Task';
+import type { Task } from '../../Task/Task';
 import { DateField } from './DateField';
 
 /**
diff --git a/src/Query/Filter/StartDateField.ts b/src/Query/Filter/StartDateField.ts
index e2a28236..e2bf2378 100644
--- a/src/Query/Filter/StartDateField.ts
+++ b/src/Query/Filter/StartDateField.ts
@@ -1,5 +1,5 @@
 import type { Moment } from 'moment';
-import type { Task } from '../../Task';
+import type { Task } from '../../Task/Task';
 import { DateField } from './DateField';
 
 /**
diff --git a/src/Query/Filter/StatusField.ts b/src/Query/Filter/StatusField.ts
index 38ca16c3..7715539d 100644
--- a/src/Query/Filter/StatusField.ts
+++ b/src/Query/Filter/StatusField.ts
@@ -1,6 +1,6 @@
-import type { Task } from '../../Task';
-import type { Comparator } from '../Sorter';
-import type { GrouperFunction } from '../Grouper';
+import type { Task } from '../../Task/Task';
+import type { Comparator } from '../Sort/Sorter';
+import type { GrouperFunction } from '../Group/Grouper';
 import { FilterInstructionsBasedField } from './FilterInstructionsBasedField';
 
 export class StatusField extends FilterInstructionsBasedField {
diff --git a/src/Query/Filter/StatusNameField.ts b/src/Query/Filter/StatusNameField.ts
index 3a295886..15aae32c 100644
--- a/src/Query/Filter/StatusNameField.ts
+++ b/src/Query/Filter/StatusNameField.ts
@@ -1,4 +1,4 @@
-import type { Task } from '../../Task';
+import type { Task } from '../../Task/Task';
 import { TextField } from './TextField';
 
 /**
diff --git a/src/Query/Filter/StatusTypeField.ts b/src/Query/Filter/StatusTypeField.ts
index 2447bde0..1e91d9db 100644
--- a/src/Query/Filter/StatusTypeField.ts
+++ b/src/Query/Filter/StatusTypeField.ts
@@ -1,7 +1,7 @@
-import type { Task } from '../../Task';
-import type { GrouperFunction } from '../Grouper';
-import { StatusType } from '../../StatusConfiguration';
-import type { Comparator } from '../Sorter';
+import type { Task } from '../../Task/Task';
+import type { GrouperFunction } from '../Group/Grouper';
+import { StatusType } from '../../Statuses/StatusConfiguration';
+import type { Comparator } from '../Sort/Sorter';
 import { Explanation } from '../Explain/Explanation';
 import { Field } from './Field';
 import { Filter } from './Filter';
diff --git a/src/Query/Filter/TagsField.ts b/src/Query/Filter/TagsField.ts
index 63bf8e89..ff6a8ccd 100644
--- a/src/Query/Filter/TagsField.ts
+++ b/src/Query/Filter/TagsField.ts
@@ -1,7 +1,7 @@
-import type { Task } from '../../Task';
-import type { Comparator } from '../Sorter';
-import { Sorter } from '../Sorter';
-import type { GrouperFunction } from '../Grouper';
+import type { Task } from '../../Task/Task';
+import type { Comparator } from '../Sort/Sorter';
+import { Sorter } from '../Sort/Sorter';
+import type { GrouperFunction } from '../Group/Grouper';
 import type { FilterOrErrorMessage } from './FilterOrErrorMessage';
 import { FilterInstructions } from './FilterInstructions';
 import { MultiTextField } from './MultiTextField';
diff --git a/src/Query/Filter/TextField.ts b/src/Query/Filter/TextField.ts
index 2c6b1276..1e9ffa5a 100644
--- a/src/Query/Filter/TextField.ts
+++ b/src/Query/Filter/TextField.ts
@@ -1,9 +1,9 @@
-import type { Task } from '../../Task';
+import type { Task } from '../../Task/Task';
 import { SubstringMatcher } from '../Matchers/SubstringMatcher';
 import { RegexMatcher } from '../Matchers/RegexMatcher';
 import type { IStringMatcher } from '../Matchers/IStringMatcher';
-import type { Comparator } from '../Sorter';
-import type { GrouperFunction } from '../Grouper';
+import type { Comparator } from '../Sort/Sorter';
+import type { GrouperFunction } from '../Group/Grouper';
 import { errorMessageForException } from '../../lib/ExceptionTools';
 import { Field } from './Field';
 import type { FilterFunction } from './Filter';
diff --git a/src/Query/Filter/UrgencyField.ts b/src/Query/Filter/UrgencyField.ts
index bb36afc7..6823985e 100644
--- a/src/Query/Filter/UrgencyField.ts
+++ b/src/Query/Filter/UrgencyField.ts
@@ -1,6 +1,6 @@
-import type { Comparator } from '../Sorter';
-import type { Task } from '../../Task';
-import type { Grouper, GrouperFunction } from '../Grouper';
+import type { Comparator } from '../Sort/Sorter';
+import type { Task } from '../../Task/Task';
+import type { Grouper, GrouperFunction } from '../Group/Grouper';
 import { Field } from './Field';
 import { FilterOrErrorMessage } from './FilterOrErrorMessage';
 
diff --git a/src/Query/FilterParser.ts b/src/Query/FilterParser.ts
index bdbc6d13..8c2edaa4 100644
--- a/src/Query/FilterParser.ts
+++ b/src/Query/FilterParser.ts
@@ -22,8 +22,8 @@ import { StatusTypeField } from './Filter/StatusTypeField';
 
 import { RecurrenceField } from './Filter/RecurrenceField';
 import type { FilterOrErrorMessage } from './Filter/FilterOrErrorMessage';
-import type { Sorter } from './Sorter';
-import type { Grouper } from './Grouper';
+import type { Sorter } from './Sort/Sorter';
+import type { Grouper } from './Group/Grouper';
 import { FolderField } from './Filter/FolderField';
 import { RootField } from './Filter/RootField';
 import { BacklinkField } from './Filter/BacklinkField';
diff --git a/src/Query/GroupDisplayHeading.ts b/src/Query/Group/GroupDisplayHeading.ts
similarity index 100%
rename from src/Query/GroupDisplayHeading.ts
rename to src/Query/Group/GroupDisplayHeading.ts
diff --git a/src/Query/GroupDisplayHeadingSelector.ts b/src/Query/Group/GroupDisplayHeadingSelector.ts
similarity index 100%
rename from src/Query/GroupDisplayHeadingSelector.ts
rename to src/Query/Group/GroupDisplayHeadingSelector.ts
diff --git a/src/Query/Grouper.ts b/src/Query/Group/Grouper.ts
similarity index 94%
rename from src/Query/Grouper.ts
rename to src/Query/Group/Grouper.ts
index 4f37afe8..89f60479 100644
--- a/src/Query/Grouper.ts
+++ b/src/Query/Group/Grouper.ts
@@ -1,5 +1,5 @@
-import type { Task } from '../Task';
-import type { SearchInfo } from './SearchInfo';
+import type { Task } from '../../Task/Task';
+import type { SearchInfo } from '../SearchInfo';
 
 /**
  * A group-naming function, that takes a Task object and returns zero or more
diff --git a/src/Query/GroupingTreeNode.ts b/src/Query/Group/GroupingTreeNode.ts
similarity index 100%
rename from src/Query/GroupingTreeNode.ts
rename to src/Query/Group/GroupingTreeNode.ts
diff --git a/src/Query/TaskGroup.ts b/src/Query/Group/TaskGroup.ts
similarity index 98%
rename from src/Query/TaskGroup.ts
rename to src/Query/Group/TaskGroup.ts
index da4a9eab..11e95638 100644
--- a/src/Query/TaskGroup.ts
+++ b/src/Query/Group/TaskGroup.ts
@@ -1,4 +1,4 @@
-import type { Task } from '../Task';
+import type { Task } from '../../Task/Task';
 import type { GroupDisplayHeading } from './GroupDisplayHeading';
 
 /**
diff --git a/src/Query/TaskGroupingTree.ts b/src/Query/Group/TaskGroupingTree.ts
similarity index 97%
rename from src/Query/TaskGroupingTree.ts
rename to src/Query/Group/TaskGroupingTree.ts
index 9f6cec25..c0a0791f 100644
--- a/src/Query/TaskGroupingTree.ts
+++ b/src/Query/Group/TaskGroupingTree.ts
@@ -1,8 +1,8 @@
-import type { Task } from '../Task';
+import type { Task } from '../../Task/Task';
+import type { SearchInfo } from '../SearchInfo';
 import type { Grouper } from './Grouper';
 import { GroupingTreeNode } from './GroupingTreeNode';
 import type { TaskGroupingTreeStorage } from './TaskGroupingTreeStorage';
-import type { SearchInfo } from './SearchInfo';
 
 /*
  * A tree of tasks where every level in the tree corresponds to a grouping property.
diff --git a/src/Query/TaskGroupingTreeStorage.ts b/src/Query/Group/TaskGroupingTreeStorage.ts
similarity index 91%
rename from src/Query/TaskGroupingTreeStorage.ts
rename to src/Query/Group/TaskGroupingTreeStorage.ts
index 9a1a90d0..4f7e5248 100644
--- a/src/Query/TaskGroupingTreeStorage.ts
+++ b/src/Query/Group/TaskGroupingTreeStorage.ts
@@ -1,4 +1,4 @@
-import type { Task } from '../Task';
+import type { Task } from '../../Task/Task';
 
 /**
  * Storage used for the initial grouping together of tasks.
diff --git a/src/Query/TaskGroups.ts b/src/Query/Group/TaskGroups.ts
similarity index 98%
rename from src/Query/TaskGroups.ts
rename to src/Query/Group/TaskGroups.ts
index f3339fc2..b1b42257 100644
--- a/src/Query/TaskGroups.ts
+++ b/src/Query/Group/TaskGroups.ts
@@ -1,10 +1,10 @@
-import type { Task } from '../Task';
+import type { Task } from '../../Task/Task';
+import type { SearchInfo } from '../SearchInfo';
 import type { Grouper } from './Grouper';
 import { GroupDisplayHeadingSelector } from './GroupDisplayHeadingSelector';
 import { TaskGroupingTree } from './TaskGroupingTree';
 import { TaskGroup } from './TaskGroup';
 import type { TaskGroupingTreeStorage } from './TaskGroupingTreeStorage';
-import type { SearchInfo } from './SearchInfo';
 
 /**
  * Store all the groups of tasks generated by any 'group by'
diff --git a/src/Query/Query.ts b/src/Query/Query.ts
index 8d3930fa..f00d03b0 100644
--- a/src/Query/Query.ts
+++ b/src/Query/Query.ts
@@ -1,17 +1,17 @@
 import { TaskLayoutOptions } from '../Layout/TaskLayoutOptions';
-import { QueryLayoutOptions } from '../QueryLayoutOptions';
+import { QueryLayoutOptions } from '../Layout/QueryLayoutOptions';
 import { expandPlaceholders } from '../Scripting/ExpandPlaceholders';
 import { makeQueryContext } from '../Scripting/QueryContext';
-import type { Task } from '../Task';
+import type { Task } from '../Task/Task';
 import type { IQuery } from '../IQuery';
 import { getSettings } from '../Config/Settings';
 import { errorMessageForException } from '../lib/ExceptionTools';
 import { logging } from '../lib/logging';
-import { Sort } from './Sort';
-import type { Sorter } from './Sorter';
-import { TaskGroups } from './TaskGroups';
+import { Sort } from './Sort/Sort';
+import type { Sorter } from './Sort/Sorter';
+import { TaskGroups } from './Group/TaskGroups';
 import * as FilterParser from './FilterParser';
-import type { Grouper } from './Grouper';
+import type { Grouper } from './Group/Grouper';
 import type { Filter } from './Filter/Filter';
 import { QueryResult } from './QueryResult';
 import { scan } from './Scanner';
diff --git a/src/Query/QueryResult.ts b/src/Query/QueryResult.ts
index 1776d325..0fa679e9 100644
--- a/src/Query/QueryResult.ts
+++ b/src/Query/QueryResult.ts
@@ -1,5 +1,5 @@
-import { TaskGroups } from './TaskGroups';
-import type { TaskGroup } from './TaskGroup';
+import { TaskGroups } from './Group/TaskGroups';
+import type { TaskGroup } from './Group/TaskGroup';
 import { SearchInfo } from './SearchInfo';
 
 function taskCountPluralised(tasksCount: number) {
diff --git a/src/Query/SearchInfo.ts b/src/Query/SearchInfo.ts
index eb9a6e7e..d098910e 100644
--- a/src/Query/SearchInfo.ts
+++ b/src/Query/SearchInfo.ts
@@ -1,4 +1,4 @@
-import type { Task } from '../Task';
+import type { Task } from '../Task/Task';
 import { type QueryContext, makeQueryContext } from '../Scripting/QueryContext';
 
 /**
diff --git a/src/Query/Sort.ts b/src/Query/Sort/Sort.ts
similarity index 78%
rename from src/Query/Sort.ts
rename to src/Query/Sort/Sort.ts
index ed01a29f..a1bffb51 100644
--- a/src/Query/Sort.ts
+++ b/src/Query/Sort/Sort.ts
@@ -1,11 +1,11 @@
-import type { Task } from '../Task';
+import type { Task } from '../../Task/Task';
+import { StatusTypeField } from '../Filter/StatusTypeField';
+import { DueDateField } from '../Filter/DueDateField';
+import { PriorityField } from '../Filter/PriorityField';
+import { PathField } from '../Filter/PathField';
+import { UrgencyField } from '../Filter/UrgencyField';
+import type { SearchInfo } from '../SearchInfo';
 import type { Comparator, Sorter } from './Sorter';
-import { StatusTypeField } from './Filter/StatusTypeField';
-import { DueDateField } from './Filter/DueDateField';
-import { PriorityField } from './Filter/PriorityField';
-import { PathField } from './Filter/PathField';
-import { UrgencyField } from './Filter/UrgencyField';
-import type { SearchInfo } from './SearchInfo';
 
 type PlainComparator = (a: Task, b: Task) => number;
 
diff --git a/src/Query/Sorter.ts b/src/Query/Sort/Sorter.ts
similarity index 95%
rename from src/Query/Sorter.ts
rename to src/Query/Sort/Sorter.ts
index 658e3402..b6a98fea 100644
--- a/src/Query/Sorter.ts
+++ b/src/Query/Sort/Sorter.ts
@@ -1,5 +1,5 @@
-import type { Task } from '../Task';
-import type { SearchInfo } from './SearchInfo';
+import type { Task } from '../../Task/Task';
+import type { SearchInfo } from '../SearchInfo';
 
 /**
  * A sorting function, that takes two Task objects and returns
diff --git a/src/QuerySql/README.md b/src/QuerySql/README.md
deleted file mode 100644
index 861c2204..00000000
--- a/src/QuerySql/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# Query SQL
-
-This folder contains the Query SQL class and related data services. Future work will be adding the code and updating this file with the context of each class in this space.
diff --git a/src/QueryRenderer.ts b/src/Renderer/QueryRenderer.ts
similarity index 94%
rename from src/QueryRenderer.ts
rename to src/Renderer/QueryRenderer.ts
index 3d88afdf..75debd04 100644
--- a/src/QueryRenderer.ts
+++ b/src/Renderer/QueryRenderer.ts
@@ -1,24 +1,24 @@
 import type { EventRef, MarkdownPostProcessorContext } from 'obsidian';
 import { App, Keymap, MarkdownRenderChild, MarkdownRenderer, TFile } from 'obsidian';
-import { State } from './Cache';
-import { GlobalFilter } from './Config/GlobalFilter';
-import { GlobalQuery } from './Config/GlobalQuery';
-import { DateFallback } from './DateFallback';
-import { getTaskLineAndFile, replaceTaskWithTasks } from './File';
-
-import type { IQuery } from './IQuery';
-import { explainResults, getQueryForQueryRenderer } from './lib/QueryRendererHelper';
-import type { GroupDisplayHeading } from './Query/GroupDisplayHeading';
-import type { QueryResult } from './Query/QueryResult';
-import type { TaskGroups } from './Query/TaskGroups';
-import { postponeButtonTitle, shouldShowPostponeButton } from './Scripting/Postponer';
-import type { Task } from './Task';
-import { TaskLayout } from './TaskLayout';
+import { GlobalFilter } from '../Config/GlobalFilter';
+import { GlobalQuery } from '../Config/GlobalQuery';
+import { DateFallback } from '../Task/DateFallback';
+
+import type { IQuery } from '../IQuery';
+import { explainResults, getQueryForQueryRenderer } from '../lib/QueryRendererHelper';
+import type { GroupDisplayHeading } from '../Query/Group/GroupDisplayHeading';
+import type { QueryResult } from '../Query/QueryResult';
+import type { TaskGroups } from '../Query/Group/TaskGroups';
+import { postponeButtonTitle, shouldShowPostponeButton } from '../Scripting/Postponer';
+import type { Task } from '../Task/Task';
+import { TaskLayout } from '../Layout/TaskLayout';
+import { PostponeMenu } from '../ui/Menus/PostponeMenu';
+import type TasksPlugin from '../main';
+import { TaskModal } from '../Obsidian/TaskModal';
+import type { TasksEvents } from '../Obsidian/TasksEvents';
+import { getTaskLineAndFile, replaceTaskWithTasks } from '../Obsidian/File';
+import { State } from '../Obsidian/Cache';
 import { TaskLineRenderer } from './TaskLineRenderer';
-import { TaskModal } from './TaskModal';
-import type { TasksEvents } from './TasksEvents';
-import { PostponeMenu } from './ui/Menus/PostponeMenu';
-import type TasksPlugin from './main';
 
 export class QueryRenderer {
     private readonly app: App;
diff --git a/src/TaskFieldRenderer.ts b/src/Renderer/TaskFieldRenderer.ts
similarity index 98%
rename from src/TaskFieldRenderer.ts
rename to src/Renderer/TaskFieldRenderer.ts
index 3799c1ae..77222f46 100644
--- a/src/TaskFieldRenderer.ts
+++ b/src/Renderer/TaskFieldRenderer.ts
@@ -1,7 +1,7 @@
 import type { Moment } from 'moment';
-import { PriorityTools } from './lib/PriorityTools';
-import type { Task } from './Task';
-import type { TaskLayoutComponent } from './TaskLayout';
+import { PriorityTools } from '../lib/PriorityTools';
+import type { Task } from '../Task/Task';
+import type { TaskLayoutComponent } from '../Layout/TaskLayout';
 
 export class TaskFieldRenderer {
     private readonly data = taskFieldHTMLData;
diff --git a/src/TaskLineRenderer.ts b/src/Renderer/TaskLineRenderer.ts
similarity index 96%
rename from src/TaskLineRenderer.ts
rename to src/Renderer/TaskLineRenderer.ts
index cb849b19..4e4844ed 100644
--- a/src/TaskLineRenderer.ts
+++ b/src/Renderer/TaskLineRenderer.ts
@@ -1,16 +1,16 @@
 import type { Moment } from 'moment';
 import { Component, MarkdownRenderer } from 'obsidian';
-import { GlobalFilter } from './Config/GlobalFilter';
-import { TASK_FORMATS, getSettings } from './Config/Settings';
-import { replaceTaskWithTasks } from './File';
-import type { TaskLayoutOptions } from './Layout/TaskLayoutOptions';
-import type { QueryLayoutOptions } from './QueryLayoutOptions';
-import type { Task } from './Task';
-import * as taskModule from './Task';
+import { GlobalFilter } from '../Config/GlobalFilter';
+import { TASK_FORMATS, getSettings } from '../Config/Settings';
+import { replaceTaskWithTasks } from '../Obsidian/File';
+import type { TaskLayoutOptions } from '../Layout/TaskLayoutOptions';
+import type { QueryLayoutOptions } from '../Layout/QueryLayoutOptions';
+import type { Task } from '../Task/Task';
+import * as taskModule from '../Task/Task';
+import type { TaskLayoutComponent } from '../Layout/TaskLayout';
+import { StatusMenu } from '../ui/Menus/StatusMenu';
+import { StatusRegistry } from '../Statuses/StatusRegistry';
 import { TaskFieldRenderer } from './TaskFieldRenderer';
-import type { TaskLayoutComponent } from './TaskLayout';
-import { StatusMenu } from './ui/Menus/StatusMenu';
-import { StatusRegistry } from './StatusRegistry';
 
 /**
  * The function used to render a Markdown task line into an existing HTML element.
diff --git a/src/Scripting/Postponer.ts b/src/Scripting/Postponer.ts
index 247966d0..06aa55b6 100644
--- a/src/Scripting/Postponer.ts
+++ b/src/Scripting/Postponer.ts
@@ -1,6 +1,6 @@
 import type { Moment, unitOfTime } from 'moment';
-import { DateFallback } from '../DateFallback';
-import { Task } from '../Task';
+import { DateFallback } from '../Task/DateFallback';
+import { Task } from '../Task/Task';
 import { TasksDate } from './TasksDate';
 
 export function shouldShowPostponeButton(task: Task) {
diff --git a/src/Scripting/TaskExpression.ts b/src/Scripting/TaskExpression.ts
index 22f259a4..490b5fb4 100644
--- a/src/Scripting/TaskExpression.ts
+++ b/src/Scripting/TaskExpression.ts
@@ -1,4 +1,4 @@
-import type { Task } from '../Task';
+import type { Task } from '../Task/Task';
 import { FunctionOrError, evaluateExpression, evaluateExpressionOrCatch, parseExpression } from './Expression';
 import type { QueryContext } from './QueryContext';
 
diff --git a/src/Scripting/TasksDate.ts b/src/Scripting/TasksDate.ts
index c2b5a3c6..ef8871ef 100644
--- a/src/Scripting/TasksDate.ts
+++ b/src/Scripting/TasksDate.ts
@@ -1,6 +1,6 @@
 import type { DurationInputArg2, Moment, unitOfTime } from 'moment';
 import { Notice } from 'obsidian';
-import { TaskRegularExpressions } from '../Task';
+import { TaskRegularExpressions } from '../Task/Task';
 import { PropertyCategory } from '../lib/PropertyCategory';
 
 /**
diff --git a/src/Status.ts b/src/Statuses/Status.ts
similarity index 100%
rename from src/Status.ts
rename to src/Statuses/Status.ts
diff --git a/src/StatusCollection.ts b/src/Statuses/StatusCollection.ts
similarity index 100%
rename from src/StatusCollection.ts
rename to src/Statuses/StatusCollection.ts
diff --git a/src/StatusConfiguration.ts b/src/Statuses/StatusConfiguration.ts
similarity index 100%
rename from src/StatusConfiguration.ts
rename to src/Statuses/StatusConfiguration.ts
diff --git a/src/StatusRegistry.ts b/src/Statuses/StatusRegistry.ts
similarity index 99%
rename from src/StatusRegistry.ts
rename to src/Statuses/StatusRegistry.ts
index be9a575e..f24f26d3 100644
--- a/src/StatusRegistry.ts
+++ b/src/Statuses/StatusRegistry.ts
@@ -1,6 +1,6 @@
+import { htmlEncodeCharacter, htmlEncodeString } from '../lib/HTMLCharacterEntities';
 import { Status } from './Status';
 import { StatusConfiguration, StatusType } from './StatusConfiguration';
-import { htmlEncodeCharacter, htmlEncodeString } from './lib/HTMLCharacterEntities';
 
 /**
  * Tracks all the registered statuses a task can have.
diff --git a/src/StatusRegistryReport.ts b/src/Statuses/StatusRegistryReport.ts
similarity index 96%
rename from src/StatusRegistryReport.ts
rename to src/Statuses/StatusRegistryReport.ts
index 1a240a50..d60c4e5c 100644
--- a/src/StatusRegistryReport.ts
+++ b/src/Statuses/StatusRegistryReport.ts
@@ -1,5 +1,5 @@
+import type { StatusSettings } from '../Config/StatusSettings';
 import type { StatusRegistry } from './StatusRegistry';
-import type { StatusSettings } from './Config/StatusSettings';
 import { tabulateStatusSettings } from './StatusSettingsReport';
 
 export function createStatusRegistryReport(
diff --git a/src/StatusSettingsReport.ts b/src/Statuses/StatusSettingsReport.ts
similarity index 97%
rename from src/StatusSettingsReport.ts
rename to src/Statuses/StatusSettingsReport.ts
index 82140d32..b614927e 100644
--- a/src/StatusSettingsReport.ts
+++ b/src/Statuses/StatusSettingsReport.ts
@@ -1,5 +1,5 @@
-import { StatusSettings } from './Config/StatusSettings';
-import { MarkdownTable } from './lib/MarkdownTable';
+import { StatusSettings } from '../Config/StatusSettings';
+import { MarkdownTable } from '../lib/MarkdownTable';
 import type { StatusConfiguration } from './StatusConfiguration';
 import { getPrintableSymbol } from './StatusRegistryReport';
 import { Status } from './Status';
diff --git a/src/StatusValidator.ts b/src/Statuses/StatusValidator.ts
similarity index 100%
rename from src/StatusValidator.ts
rename to src/Statuses/StatusValidator.ts
diff --git a/src/Suggestor/Suggestor.ts b/src/Suggestor/Suggestor.ts
index af17ef40..fb0b3a96 100644
--- a/src/Suggestor/Suggestor.ts
+++ b/src/Suggestor/Suggestor.ts
@@ -1,9 +1,9 @@
 import type { Settings } from '../Config/Settings';
 import { DateParser } from '../Query/DateParser';
-import { doAutocomplete } from '../DateAbbreviations';
-import { Recurrence } from '../Recurrence';
+import { doAutocomplete } from '../lib/DateAbbreviations';
+import { Recurrence } from '../Task/Recurrence';
 import type { DefaultTaskSerializerSymbols } from '../TaskSerializer/DefaultTaskSerializer';
-import { Task, TaskRegularExpressions } from '../Task';
+import { Task, TaskRegularExpressions } from '../Task/Task';
 import { GlobalFilter } from '../Config/GlobalFilter';
 import type { SuggestInfo, SuggestionBuilder } from '.';
 
diff --git a/src/DateFallback.ts b/src/Task/DateFallback.ts
similarity index 99%
rename from src/DateFallback.ts
rename to src/Task/DateFallback.ts
index c2bb1c42..ee4c295b 100644
--- a/src/DateFallback.ts
+++ b/src/Task/DateFallback.ts
@@ -1,5 +1,5 @@
 import type { Moment } from 'moment';
-import { getSettings } from './Config/Settings';
+import { getSettings } from '../Config/Settings';
 import { Task } from './Task';
 
 /**
diff --git a/src/Recurrence.ts b/src/Task/Recurrence.ts
similarity index 99%
rename from src/Recurrence.ts
rename to src/Task/Recurrence.ts
index ff4aa5d8..b8d10cee 100644
--- a/src/Recurrence.ts
+++ b/src/Task/Recurrence.ts
@@ -3,7 +3,7 @@ import type { Moment } from 'moment';
 // end-snippet
 
 import { RRule } from 'rrule';
-import { compareByDate } from './lib/DateTools';
+import { compareByDate } from '../lib/DateTools';
 
 export class Recurrence {
     private readonly rrule: RRule;
diff --git a/src/Task.ts b/src/Task/Task.ts
similarity index 97%
rename from src/Task.ts
rename to src/Task/Task.ts
index 4cde6c4c..3ccb2b4b 100644
--- a/src/Task.ts
+++ b/src/Task/Task.ts
@@ -1,19 +1,19 @@
 import type { Moment } from 'moment';
-import type { TaskLocation } from './TaskLocation';
-import type { Recurrence } from './Recurrence';
-import { getSettings, getUserSelectedTaskFormat } from './Config/Settings';
-import { GlobalFilter } from './Config/GlobalFilter';
-import { StatusRegistry } from './StatusRegistry';
-import type { Status } from './Status';
-import { Urgency } from './Urgency';
+import { getSettings, getUserSelectedTaskFormat } from '../Config/Settings';
+import { GlobalFilter } from '../Config/GlobalFilter';
+import { StatusRegistry } from '../Statuses/StatusRegistry';
+import type { Status } from '../Statuses/Status';
+import { compareByDate } from '../lib/DateTools';
+import { TasksDate } from '../Scripting/TasksDate';
+import { StatusType } from '../Statuses/StatusConfiguration';
+import { TasksFile } from '../Scripting/TasksFile';
+import { PriorityTools } from '../lib/PriorityTools';
+import { logging } from '../lib/logging';
+import { logEndOfTaskEdit, logStartOfTaskEdit } from '../lib/LogTasksHelper';
 import { DateFallback } from './DateFallback';
-import { compareByDate } from './lib/DateTools';
-import { TasksDate } from './Scripting/TasksDate';
-import { StatusType } from './StatusConfiguration';
-import { TasksFile } from './Scripting/TasksFile';
-import { PriorityTools } from './lib/PriorityTools';
-import { logging } from './lib/logging';
-import { logEndOfTaskEdit, logStartOfTaskEdit } from './lib/LogTasksHelper';
+import { Urgency } from './Urgency';
+import type { Recurrence } from './Recurrence';
+import type { TaskLocation } from './TaskLocation';
 
 /**
  * When sorting, make sure low always comes after none. This way any tasks with low will be below any exiting
diff --git a/src/TaskDependency.ts b/src/Task/TaskDependency.ts
similarity index 100%
rename from src/TaskDependency.ts
rename to src/Task/TaskDependency.ts
diff --git a/src/TaskLocation.ts b/src/Task/TaskLocation.ts
similarity index 100%
rename from src/TaskLocation.ts
rename to src/Task/TaskLocation.ts
diff --git a/src/Urgency.ts b/src/Task/Urgency.ts
similarity index 100%
rename from src/Urgency.ts
rename to src/Task/Urgency.ts
diff --git a/src/TaskSerializer/DataviewTaskSerializer.ts b/src/TaskSerializer/DataviewTaskSerializer.ts
index f1c9aedb..b28413f7 100644
--- a/src/TaskSerializer/DataviewTaskSerializer.ts
+++ b/src/TaskSerializer/DataviewTaskSerializer.ts
@@ -1,6 +1,6 @@
-import type { TaskLayoutComponent } from '../TaskLayout';
-import type { Task } from '../Task';
-import { Priority } from '../Task';
+import type { TaskLayoutComponent } from '../Layout/TaskLayout';
+import type { Task } from '../Task/Task';
+import { Priority } from '../Task/Task';
 import { DefaultTaskSerializer } from './DefaultTaskSerializer';
 
 /**
diff --git a/src/TaskSerializer/DefaultTaskSerializer.ts b/src/TaskSerializer/DefaultTaskSerializer.ts
index ca176baf..fb3d68b2 100644
--- a/src/TaskSerializer/DefaultTaskSerializer.ts
+++ b/src/TaskSerializer/DefaultTaskSerializer.ts
@@ -1,8 +1,8 @@
 import type { Moment } from 'moment';
 import { TaskLayoutOptions } from '../Layout/TaskLayoutOptions';
-import type { TaskLayoutComponent } from '../TaskLayout';
-import { Recurrence } from '../Recurrence';
-import { Priority, Task, TaskRegularExpressions } from '../Task';
+import type { TaskLayoutComponent } from '../Layout/TaskLayout';
+import { Recurrence } from '../Task/Recurrence';
+import { Priority, Task, TaskRegularExpressions } from '../Task/Task';
 import type { TaskDetails, TaskSerializer } from '.';
 
 /* Interface describing the symbols that {@link DefaultTaskSerializer}
diff --git a/src/TaskSerializer/index.ts b/src/TaskSerializer/index.ts
index 25f907cd..78c30a01 100644
--- a/src/TaskSerializer/index.ts
+++ b/src/TaskSerializer/index.ts
@@ -1,4 +1,4 @@
-import type { Task } from '../Task';
+import type { Task } from '../Task/Task';
 
 type Writeable<T> = { -readonly [P in keyof T]: T[P] };
 
diff --git a/src/DateAbbreviations.ts b/src/lib/DateAbbreviations.ts
similarity index 100%
rename from src/DateAbbreviations.ts
rename to src/lib/DateAbbreviations.ts
diff --git a/src/lib/LogTasksHelper.ts b/src/lib/LogTasksHelper.ts
index f4d11640..0b313513 100644
--- a/src/lib/LogTasksHelper.ts
+++ b/src/lib/LogTasksHelper.ts
@@ -1,4 +1,4 @@
-import type { Task } from '../Task';
+import type { Task } from '../Task/Task';
 import type { Logger } from './logging';
 
 /**
diff --git a/src/lib/MockDataCreator.ts b/src/lib/MockDataCreator.ts
index 902d6cca..34ed4fc1 100644
--- a/src/lib/MockDataCreator.ts
+++ b/src/lib/MockDataCreator.ts
@@ -1,5 +1,5 @@
 import type { ListItemCache, Pos } from 'obsidian';
-import type { Task } from '../Task';
+import type { Task } from '../Task/Task';
 
 type MockTaskLocation = {
     path: string;
diff --git a/src/lib/PriorityTools.ts b/src/lib/PriorityTools.ts
index 987254b2..290161fd 100644
--- a/src/lib/PriorityTools.ts
+++ b/src/lib/PriorityTools.ts
@@ -1,4 +1,4 @@
-import { Priority } from '../Task';
+import { Priority } from '../Task/Task';
 
 export class PriorityTools {
     /**
diff --git a/src/main.ts b/src/main.ts
index bf9a66a1..e7a24284 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -1,20 +1,20 @@
 import { Plugin } from 'obsidian';
 
-import { Cache } from './Cache';
+import { Cache } from './Obsidian/Cache';
 import { Commands } from './Commands';
 import { GlobalQuery } from './Config/GlobalQuery';
-import { TasksEvents } from './TasksEvents';
-import { initializeFile } from './File';
-import { InlineRenderer } from './InlineRenderer';
-import { newLivePreviewExtension } from './LivePreviewExtension';
-import { QueryRenderer } from './QueryRenderer';
+import { TasksEvents } from './Obsidian/TasksEvents';
+import { initializeFile } from './Obsidian/File';
+import { InlineRenderer } from './Obsidian/InlineRenderer';
+import { newLivePreviewExtension } from './Obsidian/LivePreviewExtension';
+import { QueryRenderer } from './Renderer/QueryRenderer';
 import { getSettings, updateSettings } from './Config/Settings';
 import { SettingsTab } from './Config/SettingsTab';
-import { StatusRegistry } from './StatusRegistry';
+import { StatusRegistry } from './Statuses/StatusRegistry';
 import { log, logging } from './lib/logging';
 import { EditorSuggestor } from './Suggestor/EditorSuggestorPopup';
 import { StatusSettings } from './Config/StatusSettings';
-import type { Task } from './Task';
+import type { Task } from './Task/Task';
 import { tasksApiV1 } from './Api';
 import { GlobalFilter } from './Config/GlobalFilter';
 
diff --git a/src/ui/EditInstructions/PriorityInstructions.ts b/src/ui/EditInstructions/PriorityInstructions.ts
index 285acce5..e02efba6 100644
--- a/src/ui/EditInstructions/PriorityInstructions.ts
+++ b/src/ui/EditInstructions/PriorityInstructions.ts
@@ -1,4 +1,4 @@
-import { Priority, Task } from '../../Task';
+import { Priority, Task } from '../../Task/Task';
 import { PriorityTools } from '../../lib/PriorityTools';
 import type { TaskEditingInstruction } from './TaskEditingInstruction';
 
diff --git a/src/ui/EditInstructions/StatusInstructions.ts b/src/ui/EditInstructions/StatusInstructions.ts
index 3a417c5a..725e5395 100644
--- a/src/ui/EditInstructions/StatusInstructions.ts
+++ b/src/ui/EditInstructions/StatusInstructions.ts
@@ -1,7 +1,7 @@
 // @ts-ignore
-import { Status } from '../../Status';
-import type { Task } from '../../Task';
-import type { StatusRegistry } from '../../StatusRegistry';
+import { Status } from '../../Statuses/Status';
+import type { Task } from '../../Task/Task';
+import type { StatusRegistry } from '../../Statuses/StatusRegistry';
 import { StatusSettings } from '../../Config/StatusSettings';
 import type { TaskEditingInstruction } from './TaskEditingInstruction';
 
diff --git a/src/ui/EditInstructions/TaskEditingInstruction.ts b/src/ui/EditInstructions/TaskEditingInstruction.ts
index 036b7841..7186191e 100644
--- a/src/ui/EditInstructions/TaskEditingInstruction.ts
+++ b/src/ui/EditInstructions/TaskEditingInstruction.ts
@@ -1,4 +1,4 @@
-import type { Task } from '../../Task';
+import type { Task } from '../../Task/Task';
 
 /**
  * An instruction interface, for editing a {@link Task} object.
diff --git a/src/ui/EditTask.svelte b/src/ui/EditTask.svelte
index ddbdade7..457a4ad9 100644
--- a/src/ui/EditTask.svelte
+++ b/src/ui/EditTask.svelte
@@ -1,16 +1,16 @@
 <script lang="ts">
     import * as chrono from 'chrono-node';
     import { onMount } from 'svelte';
-    import { Recurrence } from '../Recurrence';
+    import { Recurrence } from '../Task/Recurrence';
     import { getSettings, TASK_FORMATS } from '../Config/Settings';
     import { GlobalFilter } from '../Config/GlobalFilter';
-    import { Status } from '../Status';
-    import { Priority, Task } from '../Task';
-    import { doAutocomplete } from '../DateAbbreviations';
+    import { Status } from '../Statuses/Status';
+    import { Priority, Task } from '../Task/Task';
+    import { doAutocomplete } from '../lib/DateAbbreviations';
     import { TasksDate } from '../Scripting/TasksDate';
     import { computePosition, flip, offset, shift, size } from "@floating-ui/dom";
-    import { addDependencyToParent, ensureTaskHasId, generateUniqueId, removeDependency } from "../TaskDependency";
-    import { replaceTaskWithTasks } from "../File";
+    import { addDependencyToParent, ensureTaskHasId, generateUniqueId, removeDependency } from "../Task/TaskDependency";
+    import { replaceTaskWithTasks } from "../Obsidian/File";
 
     // These exported variables are passed in as props by TaskModal.onOpen():
     export let task: Task;
diff --git a/src/ui/Menus/PostponeMenu.ts b/src/ui/Menus/PostponeMenu.ts
index 335ccd1f..a144bc22 100644
--- a/src/ui/Menus/PostponeMenu.ts
+++ b/src/ui/Menus/PostponeMenu.ts
@@ -1,6 +1,6 @@
 import { MenuItem, Notice } from 'obsidian';
 import type { Moment, unitOfTime } from 'moment/moment';
-import type { Task } from '../../Task';
+import type { Task } from '../../Task/Task';
 import {
     type HappensDate,
     createFixedDateTask,
diff --git a/src/ui/Menus/PriorityMenu.ts b/src/ui/Menus/PriorityMenu.ts
index af9f790b..90fb14cf 100644
--- a/src/ui/Menus/PriorityMenu.ts
+++ b/src/ui/Menus/PriorityMenu.ts
@@ -1,4 +1,4 @@
-import type { Task } from '../../Task';
+import type { Task } from '../../Task/Task';
 import { allPriorityInstructions } from '../EditInstructions/PriorityInstructions';
 import { TaskEditingMenu, type TaskSaver, defaultTaskSaver } from './TaskEditingMenu';
 
diff --git a/src/ui/Menus/StatusMenu.ts b/src/ui/Menus/StatusMenu.ts
index 8529e300..f307f855 100644
--- a/src/ui/Menus/StatusMenu.ts
+++ b/src/ui/Menus/StatusMenu.ts
@@ -1,5 +1,5 @@
-import type { StatusRegistry } from '../../StatusRegistry';
-import type { Task } from '../../Task';
+import type { StatusRegistry } from '../../Statuses/StatusRegistry';
+import type { Task } from '../../Task/Task';
 import { allStatusInstructions } from '../EditInstructions/StatusInstructions';
 import { TaskEditingMenu, type TaskSaver, defaultTaskSaver } from './TaskEditingMenu';
 
diff --git a/src/ui/Menus/TaskEditingMenu.ts b/src/ui/Menus/TaskEditingMenu.ts
index 3f672b49..e50666de 100644
--- a/src/ui/Menus/TaskEditingMenu.ts
+++ b/src/ui/Menus/TaskEditingMenu.ts
@@ -1,6 +1,6 @@
 import { Menu, type MenuItem } from 'obsidian';
-import type { Task } from '../../Task';
-import { replaceTaskWithTasks } from '../../File';
+import type { Task } from '../../Task/Task';
+import { replaceTaskWithTasks } from '../../Obsidian/File';
 import type { TaskEditingInstruction } from '../EditInstructions/TaskEditingInstruction';
 
 /**


Test patch:
diff --git a/tests/Api/createTaskLineModal.test.ts b/tests/Api/createTaskLineModal.test.ts
index 7214a906..3a847675 100644
--- a/tests/Api/createTaskLineModal.test.ts
+++ b/tests/Api/createTaskLineModal.test.ts
@@ -1,5 +1,5 @@
 import type { App } from 'obsidian';
-import type { Task } from '../../src/Task';
+import type { Task } from '../../src/Task/Task';
 import { taskFromLine } from '../../src/Commands/CreateOrEditTaskParser';
 import { createTaskLineModal } from '../../src/Api/createTaskLineModal';
 import type { ITaskModal, taskModalFactory } from '../../src/Api/createTaskLineModal';
diff --git a/tests/Commands/CreateOrEditTaskParser.test.ts b/tests/Commands/CreateOrEditTaskParser.test.ts
index 262e834b..e6f821ef 100644
--- a/tests/Commands/CreateOrEditTaskParser.test.ts
+++ b/tests/Commands/CreateOrEditTaskParser.test.ts
@@ -3,7 +3,7 @@
  */
 import moment from 'moment';
 import { resetSettings, updateSettings } from '../../src/Config/Settings';
-import { Priority } from '../../src/Task';
+import { Priority } from '../../src/Task/Task';
 import { taskFromLine } from '../../src/Commands/CreateOrEditTaskParser';
 import { GlobalFilter } from '../../src/Config/GlobalFilter';
 
diff --git a/tests/Commands/ToggleDone.test.ts b/tests/Commands/ToggleDone.test.ts
index 7bf2cbaa..daac5eb6 100644
--- a/tests/Commands/ToggleDone.test.ts
+++ b/tests/Commands/ToggleDone.test.ts
@@ -6,9 +6,9 @@ import moment from 'moment';
 import type { EditorPosition } from 'obsidian';
 import { getNewCursorPosition, toggleLine } from '../../src/Commands/ToggleDone';
 import { GlobalFilter } from '../../src/Config/GlobalFilter';
-import { StatusRegistry } from '../../src/StatusRegistry';
-import { Status } from '../../src/Status';
-import { StatusConfiguration, StatusType } from '../../src/StatusConfiguration';
+import { StatusRegistry } from '../../src/Statuses/StatusRegistry';
+import { Status } from '../../src/Statuses/Status';
+import { StatusConfiguration, StatusType } from '../../src/Statuses/StatusConfiguration';
 
 window.moment = moment;
 
diff --git a/tests/Config/DebugSettings.test.ts b/tests/Config/DebugSettings.test.ts
index ec59be7c..b0b0c6c9 100644
--- a/tests/Config/DebugSettings.test.ts
+++ b/tests/Config/DebugSettings.test.ts
@@ -1,7 +1,7 @@
 import { DebugSettings } from '../../src/Config/DebugSettings';
 import { resetSettings, updateSettings } from '../../src/Config/Settings';
 import { Query } from '../../src/Query/Query';
-import { createTasksFromMarkdown } from '../TestHelpers';
+import { createTasksFromMarkdown } from '../TestingTools/TestHelpers';
 
 describe('DebugSettings', () => {
     afterEach(() => {
diff --git a/tests/GlobalFilter.test.ts b/tests/Config/GlobalFilter.test.ts
similarity index 99%
rename from tests/GlobalFilter.test.ts
rename to tests/Config/GlobalFilter.test.ts
index af988e43..03d7caf2 100644
--- a/tests/GlobalFilter.test.ts
+++ b/tests/Config/GlobalFilter.test.ts
@@ -1,4 +1,4 @@
-import { GlobalFilter } from '../src/Config/GlobalFilter';
+import { GlobalFilter } from '../../src/Config/GlobalFilter';
 
 describe('Global Filter tests', () => {
     it('getInstance() should return the same object', () => {
diff --git a/tests/Config/StatusSettings.test.ts b/tests/Config/StatusSettings.test.ts
index f5ee2949..773571e1 100644
--- a/tests/Config/StatusSettings.test.ts
+++ b/tests/Config/StatusSettings.test.ts
@@ -1,9 +1,9 @@
 import { verifyAsJson } from 'approvals/lib/Providers/Jest/JestApprovals';
 import { StatusSettings } from '../../src/Config/StatusSettings';
-import { Status } from '../../src/Status';
-import { StatusConfiguration, StatusType } from '../../src/StatusConfiguration';
-import { StatusRegistry } from '../../src/StatusRegistry';
-import type { StatusCollection } from '../../src/StatusCollection';
+import { Status } from '../../src/Statuses/Status';
+import { StatusConfiguration, StatusType } from '../../src/Statuses/StatusConfiguration';
+import { StatusRegistry } from '../../src/Statuses/StatusRegistry';
+import type { StatusCollection } from '../../src/Statuses/StatusCollection';
 
 describe('StatusSettings', () => {
     it('verify default status settings', () => {
diff --git a/tests/CustomMatchers/CustomMatchersForFilters.test.ts b/tests/CustomMatchers/CustomMatchersForFilters.test.ts
index 477f63bb..68696a8d 100644
--- a/tests/CustomMatchers/CustomMatchersForFilters.test.ts
+++ b/tests/CustomMatchers/CustomMatchersForFilters.test.ts
@@ -1,5 +1,5 @@
 import { SearchInfo } from '../../src/Query/SearchInfo';
-import type { Task } from '../../src/Task';
+import type { Task } from '../../src/Task/Task';
 import { TaskBuilder } from '../TestingTools/TaskBuilder';
 import { FilterOrErrorMessage } from '../../src/Query/Filter/FilterOrErrorMessage';
 import { Filter } from '../../src/Query/Filter/Filter';
diff --git a/tests/CustomMatchers/CustomMatchersForFilters.ts b/tests/CustomMatchers/CustomMatchersForFilters.ts
index c9e4238b..84d21259 100644
--- a/tests/CustomMatchers/CustomMatchersForFilters.ts
+++ b/tests/CustomMatchers/CustomMatchersForFilters.ts
@@ -1,10 +1,10 @@
 import { diff } from 'jest-diff';
-import type { Task } from '../../src/Task';
+import type { Task } from '../../src/Task/Task';
 import type { FilterOrErrorMessage } from '../../src/Query/Filter/FilterOrErrorMessage';
-import { fromLine } from '../TestHelpers';
+import { fromLine } from '../TestingTools/TestHelpers';
 import { TaskBuilder } from '../TestingTools/TaskBuilder';
-import type { StatusConfiguration } from '../../src/StatusConfiguration';
-import { Status } from '../../src/Status';
+import type { StatusConfiguration } from '../../src/Statuses/StatusConfiguration';
+import { Status } from '../../src/Statuses/Status';
 import { SearchInfo } from '../../src/Query/SearchInfo';
 
 /**
diff --git a/tests/CustomMatchers/CustomMatchersForGrouping.ts b/tests/CustomMatchers/CustomMatchersForGrouping.ts
index db760578..5711bbad 100644
--- a/tests/CustomMatchers/CustomMatchersForGrouping.ts
+++ b/tests/CustomMatchers/CustomMatchersForGrouping.ts
@@ -1,8 +1,8 @@
 import { diff } from 'jest-diff';
-import type { Grouper } from 'Query/Grouper';
-import type { Task } from 'Task';
+import type { Task } from '../../src/Task/Task';
+import type { Grouper } from '../../src/Query/Group/Grouper';
 import type { Field } from '../../src/Query/Filter/Field';
-import { TaskGroups } from '../../src/Query/TaskGroups';
+import { TaskGroups } from '../../src/Query/Group/TaskGroups';
 import { TaskBuilder } from '../TestingTools/TaskBuilder';
 import { SearchInfo } from '../../src/Query/SearchInfo';
 
diff --git a/tests/CustomMatchers/CustomMatchersForSorting.ts b/tests/CustomMatchers/CustomMatchersForSorting.ts
index b34d5e61..7dadc010 100644
--- a/tests/CustomMatchers/CustomMatchersForSorting.ts
+++ b/tests/CustomMatchers/CustomMatchersForSorting.ts
@@ -1,7 +1,7 @@
 import type moment from 'moment';
 import { DateParser } from '../../src/Query/DateParser';
-import type { Sorter } from '../../src/Query/Sorter';
-import type { Task } from '../../src/Task';
+import type { Sorter } from '../../src/Query/Sort/Sorter';
+import type { Task } from '../../src/Task/Task';
 import { compareByDate } from '../../src/lib/DateTools';
 import { SearchInfo } from '../../src/Query/SearchInfo';
 
diff --git a/tests/CustomMatchers/CustomMatchersForTaskSerializer.ts b/tests/CustomMatchers/CustomMatchersForTaskSerializer.ts
index 22ed4393..ae35b84b 100644
--- a/tests/CustomMatchers/CustomMatchersForTaskSerializer.ts
+++ b/tests/CustomMatchers/CustomMatchersForTaskSerializer.ts
@@ -2,8 +2,8 @@ import { diff } from 'jest-diff';
 import type { MatcherFunction } from 'expect';
 import moment from 'moment';
 import type { TaskDetails } from '../../src/TaskSerializer';
-import { Priority, TaskRegularExpressions } from '../../src/Task';
-import { Recurrence } from '../../src/Recurrence';
+import { Priority, TaskRegularExpressions } from '../../src/Task/Task';
+import { Recurrence } from '../../src/Task/Recurrence';
 
 declare global {
     namespace jest {
diff --git a/tests/CustomMatchers/CustomMatchersForTasks.ts b/tests/CustomMatchers/CustomMatchersForTasks.ts
index ada1b864..e6107bb2 100644
--- a/tests/CustomMatchers/CustomMatchersForTasks.ts
+++ b/tests/CustomMatchers/CustomMatchersForTasks.ts
@@ -1,6 +1,6 @@
 import { diff } from 'jest-diff';
-import { fromLine } from '../TestHelpers';
-import type { Task } from '../../src/Task';
+import { fromLine } from '../TestingTools/TestHelpers';
+import type { Task } from '../../src/Task/Task';
 
 declare global {
     namespace jest {
diff --git a/tests/DocumentationSamples/DocsSamplesForStatuses.test.ts b/tests/DocumentationSamples/DocsSamplesForStatuses.test.ts
index 2d874fc4..46221ab5 100644
--- a/tests/DocumentationSamples/DocsSamplesForStatuses.test.ts
+++ b/tests/DocumentationSamples/DocsSamplesForStatuses.test.ts
@@ -1,8 +1,8 @@
-import { Status } from '../../src/Status';
-import { StatusConfiguration, StatusType } from '../../src/StatusConfiguration';
-import type { StatusCollection, StatusCollectionEntry } from '../../src/StatusCollection';
+import { Status } from '../../src/Statuses/Status';
+import { StatusConfiguration, StatusType } from '../../src/Statuses/StatusConfiguration';
+import type { StatusCollection, StatusCollectionEntry } from '../../src/Statuses/StatusCollection';
 import * as Themes from '../../src/Config/Themes';
-import { StatusValidator } from '../../src/StatusValidator';
+import { StatusValidator } from '../../src/Statuses/StatusValidator';
 import * as VerifyStatuses from '../TestingTools/VerifyStatuses';
 import * as StatusExamples from '../TestingTools/StatusExamples';
 import { constructStatuses } from '../TestingTools/StatusesTestHelpers';
diff --git a/tests/DocumentationSamples/UrgencyDocs/DocsSamplesForUrgency.test.ts b/tests/DocumentationSamples/UrgencyDocs/DocsSamplesForUrgency.test.ts
index 56bb29aa..7dca1349 100644
--- a/tests/DocumentationSamples/UrgencyDocs/DocsSamplesForUrgency.test.ts
+++ b/tests/DocumentationSamples/UrgencyDocs/DocsSamplesForUrgency.test.ts
@@ -6,8 +6,8 @@ import moment from 'moment';
 
 import { verifyMarkdownForDocs } from '../../TestingTools/VerifyMarkdown';
 import { TaskBuilder } from '../../TestingTools/TaskBuilder';
-import { Urgency } from '../../../src/Urgency';
-import { Priority } from '../../../src/Task';
+import { Urgency } from '../../../src/Task/Urgency';
+import { Priority } from '../../../src/Task/Task';
 
 window.moment = moment;
 
diff --git a/tests/DocumentationSamples/ValidateTasks.test.ts b/tests/DocumentationSamples/ValidateTasks.test.ts
index fd44e759..a1901e07 100644
--- a/tests/DocumentationSamples/ValidateTasks.test.ts
+++ b/tests/DocumentationSamples/ValidateTasks.test.ts
@@ -1,6 +1,6 @@
 import { DEFAULT_SYMBOLS } from '../../src/TaskSerializer/DefaultTaskSerializer';
 import { verifyWithFileExtension } from '../TestingTools/ApprovalTestHelpers';
-import { Task } from '../../src/Task';
+import { Task } from '../../src/Task/Task';
 
 describe('validate-tasks', () => {
     it('find-unread-emojis', () => {
diff --git a/tests/TaskLayout.test.ts b/tests/Layout/TaskLayout.test.ts
similarity index 89%
rename from tests/TaskLayout.test.ts
rename to tests/Layout/TaskLayout.test.ts
index c23acaee..5db797ab 100644
--- a/tests/TaskLayout.test.ts
+++ b/tests/Layout/TaskLayout.test.ts
@@ -2,9 +2,9 @@
  * @jest-environment jsdom
  */
 
-import { TaskLayoutOptions } from '../src/Layout/TaskLayoutOptions';
-import { QueryLayoutOptions } from '../src/QueryLayoutOptions';
-import { TaskLayout } from '../src/TaskLayout';
+import { TaskLayoutOptions } from '../../src/Layout/TaskLayoutOptions';
+import { QueryLayoutOptions } from '../../src/Layout/QueryLayoutOptions';
+import { TaskLayout } from '../../src/Layout/TaskLayout';
 
 describe('TaskLayout tests', () => {
     it('should generate expected CSS classes for default layout', () => {
diff --git a/tests/File.test.replaceTaskWithTasks_issue_1680_-_Cannot_read_properties_of_undefined.approved.txt b/tests/Obsidian/File.test.replaceTaskWithTasks_issue_1680_-_Cannot_read_properties_of_undefined.approved.txt
similarity index 100%
rename from tests/File.test.replaceTaskWithTasks_issue_1680_-_Cannot_read_properties_of_undefined.approved.txt
rename to tests/Obsidian/File.test.replaceTaskWithTasks_issue_1680_-_Cannot_read_properties_of_undefined.approved.txt
diff --git a/tests/File.test.replaceTaskWithTasks_issue_688_-_block_referenced_task.approved.txt b/tests/Obsidian/File.test.replaceTaskWithTasks_issue_688_-_block_referenced_task.approved.txt
similarity index 100%
rename from tests/File.test.replaceTaskWithTasks_issue_688_-_block_referenced_task.approved.txt
rename to tests/Obsidian/File.test.replaceTaskWithTasks_issue_688_-_block_referenced_task.approved.txt
diff --git a/tests/File.test.replaceTaskWithTasks_valid_2-task_test.approved.txt b/tests/Obsidian/File.test.replaceTaskWithTasks_valid_2-task_test.approved.txt
similarity index 100%
rename from tests/File.test.replaceTaskWithTasks_valid_2-task_test.approved.txt
rename to tests/Obsidian/File.test.replaceTaskWithTasks_valid_2-task_test.approved.txt
diff --git a/tests/File.test.ts b/tests/Obsidian/File.test.ts
similarity index 96%
rename from tests/File.test.ts
rename to tests/Obsidian/File.test.ts
index 1c041c2f..b85de781 100644
--- a/tests/File.test.ts
+++ b/tests/Obsidian/File.test.ts
@@ -1,7 +1,7 @@
 import { readFileSync } from 'fs';
 import { verify } from 'approvals/lib/Providers/Jest/JestApprovals';
-import { findLineNumberOfTaskToToggle } from '../src/File';
-import type { MockTogglingDataForTesting } from '../src/lib/MockDataCreator';
+import { findLineNumberOfTaskToToggle } from '../../src/Obsidian/File';
+import type { MockTogglingDataForTesting } from '../../src/lib/MockDataCreator';
 
 /**
  * A function to help test File.findLineNumberOfTaskToToggle()
diff --git a/tests/Query/DateParser.test.ts b/tests/Query/DateParser.test.ts
index 917f1bc6..f4871da6 100644
--- a/tests/Query/DateParser.test.ts
+++ b/tests/Query/DateParser.test.ts
@@ -3,7 +3,7 @@
  */
 import moment from 'moment';
 import { DateParser } from '../../src/Query/DateParser';
-import { TaskRegularExpressions } from '../../src/Task';
+import { TaskRegularExpressions } from '../../src/Task/Task';
 
 window.moment = moment;
 
diff --git a/tests/Query/Filter/BacklinkField.test.ts b/tests/Query/Filter/BacklinkField.test.ts
index 883bdf68..3b57e133 100644
--- a/tests/Query/Filter/BacklinkField.test.ts
+++ b/tests/Query/Filter/BacklinkField.test.ts
@@ -1,5 +1,5 @@
 import { BacklinkField } from '../../../src/Query/Filter/BacklinkField';
-import { SampleTasks, fromLine } from '../../TestHelpers';
+import { SampleTasks, fromLine } from '../../TestingTools/TestHelpers';
 
 describe('backlink', () => {
     it('should provide the backlink', () => {
diff --git a/tests/Query/Filter/BlockingField.test.ts b/tests/Query/Filter/BlockingField.test.ts
index 6eddfdfd..e1449f00 100644
--- a/tests/Query/Filter/BlockingField.test.ts
+++ b/tests/Query/Filter/BlockingField.test.ts
@@ -1,7 +1,7 @@
 import { TaskBuilder } from '../../TestingTools/TaskBuilder';
 import { BlockingField } from '../../../src/Query/Filter/BlockingField';
 import { BooleanField } from '../../../src/Query/Filter/BooleanField';
-import { Status } from '../../../src/Status';
+import { Status } from '../../../src/Statuses/Status';
 
 describe('blocking', () => {
     const notBlocking = new TaskBuilder().build();
diff --git a/tests/Query/Filter/CancelledDateField.test.ts b/tests/Query/Filter/CancelledDateField.test.ts
index c40fbca2..656e3f83 100644
--- a/tests/Query/Filter/CancelledDateField.test.ts
+++ b/tests/Query/Filter/CancelledDateField.test.ts
@@ -7,7 +7,7 @@ import type { FilterOrErrorMessage } from '../../../src/Query/Filter/FilterOrErr
 import { TaskBuilder } from '../../TestingTools/TaskBuilder';
 import { testFilter } from '../../TestingTools/FilterTestHelpers';
 import { expectTaskComparesAfter, expectTaskComparesBefore } from '../../CustomMatchers/CustomMatchersForSorting';
-import { SampleTasks } from '../../TestHelpers';
+import { SampleTasks } from '../../TestingTools/TestHelpers';
 
 window.moment = moment;
 
diff --git a/tests/Query/Filter/CreatedDateField.test.ts b/tests/Query/Filter/CreatedDateField.test.ts
index 43c37354..a57925d2 100644
--- a/tests/Query/Filter/CreatedDateField.test.ts
+++ b/tests/Query/Filter/CreatedDateField.test.ts
@@ -11,7 +11,7 @@ import {
     expectTaskComparesBefore,
     expectTaskComparesEqual,
 } from '../../CustomMatchers/CustomMatchersForSorting';
-import { SampleTasks } from '../../TestHelpers';
+import { SampleTasks } from '../../TestingTools/TestHelpers';
 
 window.moment = moment;
 
diff --git a/tests/Query/Filter/DescriptionField.test.ts b/tests/Query/Filter/DescriptionField.test.ts
index 73836760..3975ad8e 100644
--- a/tests/Query/Filter/DescriptionField.test.ts
+++ b/tests/Query/Filter/DescriptionField.test.ts
@@ -5,7 +5,7 @@ import moment from 'moment';
 import { DescriptionField } from '../../../src/Query/Filter/DescriptionField';
 import { GlobalFilter } from '../../../src/Config/GlobalFilter';
 import { testTaskFilter } from '../../TestingTools/FilterTestHelpers';
-import { fromLine } from '../../TestHelpers';
+import { fromLine } from '../../TestingTools/TestHelpers';
 import type { FilterOrErrorMessage } from '../../../src/Query/Filter/FilterOrErrorMessage';
 import { BooleanField } from '../../../src/Query/Filter/BooleanField';
 import {
diff --git a/tests/Query/Filter/DoneDateField.test.ts b/tests/Query/Filter/DoneDateField.test.ts
index 4967237f..7ce31d10 100644
--- a/tests/Query/Filter/DoneDateField.test.ts
+++ b/tests/Query/Filter/DoneDateField.test.ts
@@ -7,7 +7,7 @@ import type { FilterOrErrorMessage } from '../../../src/Query/Filter/FilterOrErr
 import { TaskBuilder } from '../../TestingTools/TaskBuilder';
 import { testFilter } from '../../TestingTools/FilterTestHelpers';
 import { expectTaskComparesAfter, expectTaskComparesBefore } from '../../CustomMatchers/CustomMatchersForSorting';
-import { SampleTasks } from '../../TestHelpers';
+import { SampleTasks } from '../../TestingTools/TestHelpers';
 
 window.moment = moment;
 
diff --git a/tests/Query/Filter/DueDateField.test.ts b/tests/Query/Filter/DueDateField.test.ts
index d5a01ee9..b6a8eb74 100644
--- a/tests/Query/Filter/DueDateField.test.ts
+++ b/tests/Query/Filter/DueDateField.test.ts
@@ -13,7 +13,7 @@ import {
 } from '../../CustomMatchers/CustomMatchersForSorting';
 import { Query } from '../../../src/Query/Query';
 import { verifyMarkdown } from '../../TestingTools/VerifyMarkdown';
-import { SampleTasks } from '../../TestHelpers';
+import { SampleTasks } from '../../TestingTools/TestHelpers';
 import { MarkdownTable } from '../../../src/lib/MarkdownTable';
 import { Explainer } from '../../../src/Query/Explain/Explainer';
 
diff --git a/tests/Query/Filter/ExcludeSubItemsField.test.ts b/tests/Query/Filter/ExcludeSubItemsField.test.ts
index 2678b5c4..6fe8294e 100644
--- a/tests/Query/Filter/ExcludeSubItemsField.test.ts
+++ b/tests/Query/Filter/ExcludeSubItemsField.test.ts
@@ -1,5 +1,5 @@
 import { testTaskFilter } from '../../TestingTools/FilterTestHelpers';
-import { fromLine } from '../../TestHelpers';
+import { fromLine } from '../../TestingTools/TestHelpers';
 import { ExcludeSubItemsField } from '../../../src/Query/Filter/ExcludeSubItemsField';
 
 describe('sub-items', () => {
diff --git a/tests/Query/Filter/Field.test.ts b/tests/Query/Filter/Field.test.ts
index 8147a478..7189ad86 100644
--- a/tests/Query/Filter/Field.test.ts
+++ b/tests/Query/Filter/Field.test.ts
@@ -1,7 +1,7 @@
 import { Field } from '../../../src/Query/Filter/Field';
 import type { FilterOrErrorMessage } from '../../../src/Query/Filter/FilterOrErrorMessage';
-import type { Comparator } from '../../../src/Query/Sorter';
-import type { Task } from '../../../src/Task';
+import type { Comparator } from '../../../src/Query/Sort/Sorter';
+import type { Task } from '../../../src/Task/Task';
 import { expectTaskComparesBefore } from '../../CustomMatchers/CustomMatchersForSorting';
 import { TaskBuilder } from '../../TestingTools/TaskBuilder';
 
diff --git a/tests/Query/Filter/FilenameField.test.ts b/tests/Query/Filter/FilenameField.test.ts
index deb794d2..ad398446 100644
--- a/tests/Query/Filter/FilenameField.test.ts
+++ b/tests/Query/Filter/FilenameField.test.ts
@@ -1,7 +1,7 @@
 import { TaskBuilder } from '../../TestingTools/TaskBuilder';
 import { FilenameField } from '../../../src/Query/Filter/FilenameField';
 import * as CustomMatchersForSorting from '../../CustomMatchers/CustomMatchersForSorting';
-import { SampleTasks, fromLine } from '../../TestHelpers';
+import { SampleTasks, fromLine } from '../../TestingTools/TestHelpers';
 
 describe('filename', () => {
     it('should provide access to the file name with extension', () => {
diff --git a/tests/Query/Filter/Filter.test.ts b/tests/Query/Filter/Filter.test.ts
index 0f8f1208..dea2db4c 100644
--- a/tests/Query/Filter/Filter.test.ts
+++ b/tests/Query/Filter/Filter.test.ts
@@ -1,7 +1,7 @@
 import { Filter } from '../../../src/Query/Filter/Filter';
 import { FilterOrErrorMessage } from '../../../src/Query/Filter/FilterOrErrorMessage';
 import type { FilterFunction } from '../../../src/Query/Filter/Filter';
-import type { Task } from '../../../src/Task';
+import type { Task } from '../../../src/Task/Task';
 import { Explanation } from '../../../src/Query/Explain/Explanation';
 
 describe('Filter', () => {
diff --git a/tests/Query/Filter/FilterInstruction.test.ts b/tests/Query/Filter/FilterInstruction.test.ts
index 0eb72d43..c6148a9d 100644
--- a/tests/Query/Filter/FilterInstruction.test.ts
+++ b/tests/Query/Filter/FilterInstruction.test.ts
@@ -1,6 +1,6 @@
 import { FilterInstruction } from '../../../src/Query/Filter/FilterInstruction';
 import type { FilterFunction } from '../../../src/Query/Filter/Filter';
-import type { Task } from '../../../src/Task';
+import type { Task } from '../../../src/Task/Task';
 
 describe('FilterInstruction', () => {
     const filter: FilterFunction = (_task: Task) => true;
diff --git a/tests/Query/Filter/FolderField.test.ts b/tests/Query/Filter/FolderField.test.ts
index 12ef01f5..835b8ea8 100644
--- a/tests/Query/Filter/FolderField.test.ts
+++ b/tests/Query/Filter/FolderField.test.ts
@@ -1,5 +1,5 @@
 import { FolderField } from '../../../src/Query/Filter/FolderField';
-import { SampleTasks, fromLine } from '../../TestHelpers';
+import { SampleTasks, fromLine } from '../../TestingTools/TestHelpers';
 
 describe('folder', () => {
     it('should provide access to the folder', () => {
diff --git a/tests/Query/Filter/FunctionField.test.ts b/tests/Query/Filter/FunctionField.test.ts
index 946b79d0..22507d85 100644
--- a/tests/Query/Filter/FunctionField.test.ts
+++ b/tests/Query/Filter/FunctionField.test.ts
@@ -4,9 +4,9 @@
 import moment from 'moment';
 
 import { FunctionField } from '../../../src/Query/Filter/FunctionField';
-import { Status } from '../../../src/Status';
-import type { Task } from '../../../src/Task';
-import { Priority } from '../../../src/Task';
+import { Status } from '../../../src/Statuses/Status';
+import type { Task } from '../../../src/Task/Task';
+import { Priority } from '../../../src/Task/Task';
 import {
     toGroupTaskFromBuilder,
     toGroupTaskUsingSearchInfo,
@@ -19,7 +19,7 @@ import {
     expectTaskComparesBefore,
     expectTaskComparesEqual,
 } from '../../CustomMatchers/CustomMatchersForSorting';
-import { fromLine } from '../../TestHelpers';
+import { fromLine } from '../../TestingTools/TestHelpers';
 import { Query } from '../../../src/Query/Query';
 import { TasksDate } from '../../../src/Scripting/TasksDate';
 
diff --git a/tests/Query/Filter/HappensDateField.test.ts b/tests/Query/Filter/HappensDateField.test.ts
index 5964ce40..d67f4605 100644
--- a/tests/Query/Filter/HappensDateField.test.ts
+++ b/tests/Query/Filter/HappensDateField.test.ts
@@ -6,7 +6,7 @@ import { HappensDateField } from '../../../src/Query/Filter/HappensDateField';
 import { TaskBuilder } from '../../TestingTools/TaskBuilder';
 import { testFilter } from '../../TestingTools/FilterTestHelpers';
 import * as CustomMatchersForSorting from '../../CustomMatchers/CustomMatchersForSorting';
-import { SampleTasks, fromLine } from '../../TestHelpers';
+import { SampleTasks, fromLine } from '../../TestingTools/TestHelpers';
 
 window.moment = moment;
 
diff --git a/tests/Query/Filter/HeadingField.test.ts b/tests/Query/Filter/HeadingField.test.ts
index 97d03acb..0f649f42 100644
--- a/tests/Query/Filter/HeadingField.test.ts
+++ b/tests/Query/Filter/HeadingField.test.ts
@@ -3,7 +3,7 @@ import type { FilterOrErrorMessage } from '../../../src/Query/Filter/FilterOrErr
 import { TaskBuilder } from '../../TestingTools/TaskBuilder';
 import { testFilter } from '../../TestingTools/FilterTestHelpers';
 import * as CustomMatchersForSorting from '../../CustomMatchers/CustomMatchersForSorting';
-import { SampleTasks, fromLine } from '../../TestHelpers';
+import { SampleTasks, fromLine } from '../../TestingTools/TestHelpers';
 
 function testTaskFilterForHeading(filter: FilterOrErrorMessage, precedingHeader: string | null, expected: boolean) {
     const builder = new TaskBuilder();
diff --git a/tests/Query/Filter/PathField.test.ts b/tests/Query/Filter/PathField.test.ts
index c96e032f..6367a3bc 100644
--- a/tests/Query/Filter/PathField.test.ts
+++ b/tests/Query/Filter/PathField.test.ts
@@ -7,7 +7,7 @@ import {
     expectTaskComparesBefore,
     expectTaskComparesEqual,
 } from '../../CustomMatchers/CustomMatchersForSorting';
-import { SampleTasks, fromLine } from '../../TestHelpers';
+import { SampleTasks, fromLine } from '../../TestingTools/TestHelpers';
 
 function testTaskFilterForTaskWithPath(filter: FilterOrErrorMessage, path: string, expected: boolean) {
     const builder = new TaskBuilder();
diff --git a/tests/Query/Filter/PriorityField.test.ts b/tests/Query/Filter/PriorityField.test.ts
index 6b73fd56..106506e5 100644
--- a/tests/Query/Filter/PriorityField.test.ts
+++ b/tests/Query/Filter/PriorityField.test.ts
@@ -1,8 +1,8 @@
-import { Priority } from '../../../src/Task';
+import { Priority } from '../../../src/Task/Task';
 import { TaskBuilder } from '../../TestingTools/TaskBuilder';
 import { testFilter } from '../../TestingTools/FilterTestHelpers';
 import { PriorityField } from '../../../src/Query/Filter/PriorityField';
-import { SampleTasks, fromLine } from '../../TestHelpers';
+import { SampleTasks, fromLine } from '../../TestingTools/TestHelpers';
 
 import {
     expectTaskComparesAfter,
diff --git a/tests/Query/Filter/RecurrenceField.test.ts b/tests/Query/Filter/RecurrenceField.test.ts
index 566c8998..97abba78 100644
--- a/tests/Query/Filter/RecurrenceField.test.ts
+++ b/tests/Query/Filter/RecurrenceField.test.ts
@@ -6,7 +6,7 @@ import moment from 'moment';
 import { RecurrenceField } from '../../../src/Query/Filter/RecurrenceField';
 import { TaskBuilder } from '../../TestingTools/TaskBuilder';
 import { RecurrenceBuilder } from '../../TestingTools/RecurrenceBuilder';
-import { SampleTasks, fromLine } from '../../TestHelpers';
+import { SampleTasks, fromLine } from '../../TestingTools/TestHelpers';
 
 window.moment = moment;
 
diff --git a/tests/Query/Filter/RecurringField.test.ts b/tests/Query/Filter/RecurringField.test.ts
index 25de43e6..3ff65580 100644
--- a/tests/Query/Filter/RecurringField.test.ts
+++ b/tests/Query/Filter/RecurringField.test.ts
@@ -5,7 +5,7 @@ import moment from 'moment';
 import { RecurringField } from '../../../src/Query/Filter/RecurringField';
 import type { FilterOrErrorMessage } from '../../../src/Query/Filter/FilterOrErrorMessage';
 import { testTaskFilter } from '../../TestingTools/FilterTestHelpers';
-import { SampleTasks, fromLine } from '../../TestHelpers';
+import { SampleTasks, fromLine } from '../../TestingTools/TestHelpers';
 import { TaskBuilder } from '../../TestingTools/TaskBuilder';
 import {
     expectTaskComparesAfter,
diff --git a/tests/Query/Filter/RootField.test.ts b/tests/Query/Filter/RootField.test.ts
index 5b69dc0e..eee06bd7 100644
--- a/tests/Query/Filter/RootField.test.ts
+++ b/tests/Query/Filter/RootField.test.ts
@@ -1,5 +1,5 @@
 import { RootField } from '../../../src/Query/Filter/RootField';
-import { SampleTasks, fromLine } from '../../TestHelpers';
+import { SampleTasks, fromLine } from '../../TestingTools/TestHelpers';
 
 describe('root', () => {
     it('should provide access to root folder name with trailing slash', () => {
diff --git a/tests/Query/Filter/ScheduledDateField.test.ts b/tests/Query/Filter/ScheduledDateField.test.ts
index d1695b05..f1d1becf 100644
--- a/tests/Query/Filter/ScheduledDateField.test.ts
+++ b/tests/Query/Filter/ScheduledDateField.test.ts
@@ -5,7 +5,7 @@ import moment from 'moment';
 import { ScheduledDateField } from '../../../src/Query/Filter/ScheduledDateField';
 import { TaskBuilder } from '../../TestingTools/TaskBuilder';
 import { expectTaskComparesAfter, expectTaskComparesBefore } from '../../CustomMatchers/CustomMatchersForSorting';
-import { SampleTasks } from '../../TestHelpers';
+import { SampleTasks } from '../../TestingTools/TestHelpers';
 
 window.moment = moment;
 
diff --git a/tests/Query/Filter/StartDateField.test.ts b/tests/Query/Filter/StartDateField.test.ts
index 6a5105fd..4b7b041c 100644
--- a/tests/Query/Filter/StartDateField.test.ts
+++ b/tests/Query/Filter/StartDateField.test.ts
@@ -5,7 +5,7 @@ import moment from 'moment';
 import { StartDateField } from '../../../src/Query/Filter/StartDateField';
 import { TaskBuilder } from '../../TestingTools/TaskBuilder';
 import { expectTaskComparesAfter, expectTaskComparesBefore } from '../../CustomMatchers/CustomMatchersForSorting';
-import { SampleTasks } from '../../TestHelpers';
+import { SampleTasks } from '../../TestingTools/TestHelpers';
 
 window.moment = moment;
 
diff --git a/tests/Query/Filter/StatusField.test.ts b/tests/Query/Filter/StatusField.test.ts
index d1fd712b..df91b447 100644
--- a/tests/Query/Filter/StatusField.test.ts
+++ b/tests/Query/Filter/StatusField.test.ts
@@ -1,14 +1,14 @@
 import { StatusField } from '../../../src/Query/Filter/StatusField';
 import { TaskBuilder } from '../../TestingTools/TaskBuilder';
-import { Status } from '../../../src/Status';
-import * as TestHelpers from '../../TestHelpers';
+import { Status } from '../../../src/Statuses/Status';
+import * as TestHelpers from '../../TestingTools/TestHelpers';
 import {
     expectTaskComparesAfter,
     expectTaskComparesBefore,
     expectTaskComparesEqual,
 } from '../../CustomMatchers/CustomMatchersForSorting';
-import { StatusConfiguration, StatusType } from '../../../src/StatusConfiguration';
-import { fromLine } from '../../TestHelpers';
+import { StatusConfiguration, StatusType } from '../../../src/Statuses/StatusConfiguration';
+import { fromLine } from '../../TestingTools/TestHelpers';
 
 describe('status', () => {
     it('done', () => {
diff --git a/tests/Query/Filter/StatusNameField.test.ts b/tests/Query/Filter/StatusNameField.test.ts
index 6b79d601..01a075e9 100644
--- a/tests/Query/Filter/StatusNameField.test.ts
+++ b/tests/Query/Filter/StatusNameField.test.ts
@@ -4,7 +4,7 @@ import {
     expectTaskComparesBefore,
     expectTaskComparesEqual,
 } from '../../CustomMatchers/CustomMatchersForSorting';
-import { SampleTasks, fromLine } from '../../TestHelpers';
+import { SampleTasks, fromLine } from '../../TestingTools/TestHelpers';
 
 // Abbreviated names so that the markdown text is aligned
 const todoTask = fromLine({ line: '- [ ] Xxx' });
diff --git a/tests/Query/Filter/StatusTypeField.test.ts b/tests/Query/Filter/StatusTypeField.test.ts
index a9289afa..2d9e4189 100644
--- a/tests/Query/Filter/StatusTypeField.test.ts
+++ b/tests/Query/Filter/StatusTypeField.test.ts
@@ -5,10 +5,10 @@ import {
     expectTaskComparesEqual,
 } from '../../CustomMatchers/CustomMatchersForSorting';
 import { TaskBuilder } from '../../TestingTools/TaskBuilder';
-import { StatusType } from '../../../src/StatusConfiguration';
-import { Status } from '../../../src/Status';
+import { StatusType } from '../../../src/Statuses/StatusConfiguration';
+import { Status } from '../../../src/Statuses/Status';
 import * as FilterParser from '../../../src/Query/FilterParser';
-import { SampleTasks, fromLine } from '../../TestHelpers';
+import { SampleTasks, fromLine } from '../../TestingTools/TestHelpers';
 
 // Abbreviated names so that the markdown text is aligned
 const todoTask = fromLine({ line: '- [ ] Todo' });
diff --git a/tests/Query/Filter/TagsField.test.ts b/tests/Query/Filter/TagsField.test.ts
index c236a8a5..75a6ee85 100644
--- a/tests/Query/Filter/TagsField.test.ts
+++ b/tests/Query/Filter/TagsField.test.ts
@@ -3,11 +3,11 @@ import type { FilteringCase } from '../../TestingTools/FilterTestHelpers';
 import { shouldSupportFiltering } from '../../TestingTools/FilterTestHelpers';
 import { TagsField } from '../../../src/Query/Filter/TagsField';
 import { DescriptionField } from '../../../src/Query/Filter/DescriptionField';
-import { fromLine } from '../../TestHelpers';
+import { fromLine } from '../../TestingTools/TestHelpers';
 import { TaskBuilder } from '../../TestingTools/TaskBuilder';
 import { expectTaskComparesAfter, expectTaskComparesBefore } from '../../CustomMatchers/CustomMatchersForSorting';
-import type { Grouper } from '../../../src/Query/Grouper';
-import { TaskGroups } from '../../../src/Query/TaskGroups';
+import type { Grouper } from '../../../src/Query/Group/Grouper';
+import { TaskGroups } from '../../../src/Query/Group/TaskGroups';
 import { SearchInfo } from '../../../src/Query/SearchInfo';
 import { sortBy } from '../../TestingTools/SortingTestHelpers';
 
diff --git a/tests/Query/Filter/UrgencyField.test.ts b/tests/Query/Filter/UrgencyField.test.ts
index 8c2ce153..a28b0c39 100644
--- a/tests/Query/Filter/UrgencyField.test.ts
+++ b/tests/Query/Filter/UrgencyField.test.ts
@@ -2,7 +2,7 @@
  * @jest-environment jsdom
  */
 import moment from 'moment';
-import { Priority } from '../../../src/Task';
+import { Priority } from '../../../src/Task/Task';
 import { TaskBuilder } from '../../TestingTools/TaskBuilder';
 import { UrgencyField } from '../../../src/Query/Filter/UrgencyField';
 
@@ -11,7 +11,7 @@ import {
     expectTaskComparesBefore,
     expectTaskComparesEqual,
 } from '../../CustomMatchers/CustomMatchersForSorting';
-import { fromLine } from '../../TestHelpers';
+import { fromLine } from '../../TestingTools/TestHelpers';
 
 window.moment = moment;
 
diff --git a/tests/GroupingTreeNode.test.ts b/tests/Query/Group/GroupingTreeNode.test.ts
similarity index 96%
rename from tests/GroupingTreeNode.test.ts
rename to tests/Query/Group/GroupingTreeNode.test.ts
index 7649704c..f2197808 100644
--- a/tests/GroupingTreeNode.test.ts
+++ b/tests/Query/Group/GroupingTreeNode.test.ts
@@ -1,7 +1,7 @@
 /**
  * @jest-environment jsdom
  */
-import { GroupingTreeNode } from '../src/Query/GroupingTreeNode';
+import { GroupingTreeNode } from '../../../src/Query/Group/GroupingTreeNode';
 
 describe('Grouping Tree', () => {
     it('correctly generates all paths', () => {
diff --git a/tests/TaskGroups.test.ts b/tests/Query/Group/TaskGroups.test.ts
similarity index 94%
rename from tests/TaskGroups.test.ts
rename to tests/Query/Group/TaskGroups.test.ts
index 2e323a70..1f83856a 100644
--- a/tests/TaskGroups.test.ts
+++ b/tests/Query/Group/TaskGroups.test.ts
@@ -2,19 +2,19 @@
  * @jest-environment jsdom
  */
 import moment from 'moment';
-import { FilenameField } from '../src/Query/Filter/FilenameField';
-import { Grouper, type GrouperFunction } from '../src/Query/Grouper';
-import type { Task } from '../src/Task';
-import { PathField } from '../src/Query/Filter/PathField';
-import { TagsField } from '../src/Query/Filter/TagsField';
-import { FolderField } from '../src/Query/Filter/FolderField';
-import { TaskGroups } from '../src/Query/TaskGroups';
-import { StatusTypeField } from '../src/Query/Filter/StatusTypeField';
-import { HappensDateField } from '../src/Query/Filter/HappensDateField';
-import { DueDateField } from '../src/Query/Filter/DueDateField';
-import { SearchInfo } from '../src/Query/SearchInfo';
-import { fromLine } from './TestHelpers';
-import { TaskBuilder } from './TestingTools/TaskBuilder';
+import { FilenameField } from '../../../src/Query/Filter/FilenameField';
+import { Grouper, type GrouperFunction } from '../../../src/Query/Group/Grouper';
+import type { Task } from '../../../src/Task/Task';
+import { PathField } from '../../../src/Query/Filter/PathField';
+import { TagsField } from '../../../src/Query/Filter/TagsField';
+import { FolderField } from '../../../src/Query/Filter/FolderField';
+import { TaskGroups } from '../../../src/Query/Group/TaskGroups';
+import { StatusTypeField } from '../../../src/Query/Filter/StatusTypeField';
+import { HappensDateField } from '../../../src/Query/Filter/HappensDateField';
+import { DueDateField } from '../../../src/Query/Filter/DueDateField';
+import { SearchInfo } from '../../../src/Query/SearchInfo';
+import { fromLine } from '../../TestingTools/TestHelpers';
+import { TaskBuilder } from '../../TestingTools/TaskBuilder';
 
 window.moment = moment;
 
diff --git a/tests/Query.test.ts b/tests/Query/Query.test.ts
similarity index 98%
rename from tests/Query.test.ts
rename to tests/Query/Query.test.ts
index 82ab7a88..6d803fbd 100644
--- a/tests/Query.test.ts
+++ b/tests/Query/Query.test.ts
@@ -2,22 +2,22 @@
  * @jest-environment jsdom
  */
 import moment from 'moment';
-import { Query } from '../src/Query/Query';
-import { Status } from '../src/Status';
-import { Priority, Task } from '../src/Task';
-import { TaskLocation } from '../src/TaskLocation';
-import { fieldCreators } from '../src/Query/FilterParser';
-import type { Field } from '../src/Query/Filter/Field';
-import type { BooleanField } from '../src/Query/Filter/BooleanField';
-import { SearchInfo } from '../src/Query/SearchInfo';
-import { FilterOrErrorMessage } from '../src/Query/Filter/FilterOrErrorMessage';
-import { Explanation } from '../src/Query/Explain/Explanation';
-import { Filter } from '../src/Query/Filter/Filter';
-import { DescriptionField } from '../src/Query/Filter/DescriptionField';
-import { createTasksFromMarkdown, fromLine } from './TestHelpers';
-import type { FilteringCase } from './TestingTools/FilterTestHelpers';
-import { shouldSupportFiltering } from './TestingTools/FilterTestHelpers';
-import { TaskBuilder } from './TestingTools/TaskBuilder';
+import { Query } from '../../src/Query/Query';
+import { Status } from '../../src/Statuses/Status';
+import { Priority, Task } from '../../src/Task/Task';
+import { TaskLocation } from '../../src/Task/TaskLocation';
+import { fieldCreators } from '../../src/Query/FilterParser';
+import type { Field } from '../../src/Query/Filter/Field';
+import type { BooleanField } from '../../src/Query/Filter/BooleanField';
+import { SearchInfo } from '../../src/Query/SearchInfo';
+import { FilterOrErrorMessage } from '../../src/Query/Filter/FilterOrErrorMessage';
+import { Explanation } from '../../src/Query/Explain/Explanation';
+import { Filter } from '../../src/Query/Filter/Filter';
+import { DescriptionField } from '../../src/Query/Filter/DescriptionField';
+import { createTasksFromMarkdown, fromLine } from '../TestingTools/TestHelpers';
+import type { FilteringCase } from '../TestingTools/FilterTestHelpers';
+import { shouldSupportFiltering } from '../TestingTools/FilterTestHelpers';
+import { TaskBuilder } from '../TestingTools/TaskBuilder';
 
 window.moment = moment;
 
diff --git a/tests/Query/QueryResult.test.ts b/tests/Query/QueryResult.test.ts
index cd796b63..b24f7cff 100644
--- a/tests/Query/QueryResult.test.ts
+++ b/tests/Query/QueryResult.test.ts
@@ -1,8 +1,8 @@
-import { TaskGroups } from '../../src/Query/TaskGroups';
-import type { Grouper } from '../../src/Query/Grouper';
-import type { Task } from '../../src/Task';
+import { TaskGroups } from '../../src/Query/Group/TaskGroups';
+import type { Grouper } from '../../src/Query/Group/Grouper';
+import type { Task } from '../../src/Task/Task';
 import { QueryResult } from '../../src/Query/QueryResult';
-import { fromLine } from '../TestHelpers';
+import { fromLine } from '../TestingTools/TestHelpers';
 import { SearchInfo } from '../../src/Query/SearchInfo';
 
 describe('QueryResult', () => {
diff --git a/tests/Scanner.test.continue_lines_visualise_continue_lines.approved.txt b/tests/Query/Scanner.test.continue_lines_visualise_continue_lines.approved.txt
similarity index 100%
rename from tests/Scanner.test.continue_lines_visualise_continue_lines.approved.txt
rename to tests/Query/Scanner.test.continue_lines_visualise_continue_lines.approved.txt
diff --git a/tests/Scanner.test.scan_visualise_scanning.approved.txt b/tests/Query/Scanner.test.scan_visualise_scanning.approved.txt
similarity index 100%
rename from tests/Scanner.test.scan_visualise_scanning.approved.txt
rename to tests/Query/Scanner.test.scan_visualise_scanning.approved.txt
diff --git a/tests/Scanner.test.ts b/tests/Query/Scanner.test.ts
similarity index 98%
rename from tests/Scanner.test.ts
rename to tests/Query/Scanner.test.ts
index ab5ba03e..09e8b7f7 100644
--- a/tests/Scanner.test.ts
+++ b/tests/Query/Scanner.test.ts
@@ -1,5 +1,5 @@
 import { verify } from 'approvals/lib/Providers/Jest/JestApprovals';
-import { continue_lines, scan } from '../src/Query/Scanner';
+import { continue_lines, scan } from '../../src/Query/Scanner';
 
 // There is no way to have a literal \ at the end of a raw string.
 // In such cases, we use substitution instead.
diff --git a/tests/Sort.test.Sort_save_default_sort_order.approved.text b/tests/Query/Sort/Sort.test.Sort_save_default_sort_order.approved.text
similarity index 100%
rename from tests/Sort.test.Sort_save_default_sort_order.approved.text
rename to tests/Query/Sort/Sort.test.Sort_save_default_sort_order.approved.text
diff --git a/tests/Sort.test.Sort_visualise_date_impact_on_default_sort_order.approved.txt b/tests/Query/Sort/Sort.test.Sort_visualise_date_impact_on_default_sort_order.approved.txt
similarity index 100%
rename from tests/Sort.test.Sort_visualise_date_impact_on_default_sort_order.approved.txt
rename to tests/Query/Sort/Sort.test.Sort_visualise_date_impact_on_default_sort_order.approved.txt
diff --git a/tests/Sort.test.Sort_visualise_default_sort_order.approved.txt b/tests/Query/Sort/Sort.test.Sort_visualise_default_sort_order.approved.txt
similarity index 100%
rename from tests/Sort.test.Sort_visualise_default_sort_order.approved.txt
rename to tests/Query/Sort/Sort.test.Sort_visualise_default_sort_order.approved.txt
diff --git a/tests/Sort.test.ts b/tests/Query/Sort/Sort.test.ts
similarity index 88%
rename from tests/Sort.test.ts
rename to tests/Query/Sort/Sort.test.ts
index cd56b8ad..82e2bfb4 100644
--- a/tests/Sort.test.ts
+++ b/tests/Query/Sort/Sort.test.ts
@@ -6,20 +6,20 @@ import moment from 'moment';
 window.moment = moment;
 
 import { verify } from 'approvals/lib/Providers/Jest/JestApprovals';
-import type { Comparator } from '../src/Query/Sorter';
-import { Sorter } from '../src/Query/Sorter';
-import { Task } from '../src/Task';
-import { StatusField } from '../src/Query/Filter/StatusField';
-import { DueDateField } from '../src/Query/Filter/DueDateField';
-import { PathField } from '../src/Query/Filter/PathField';
-import { SearchInfo } from '../src/Query/SearchInfo';
-import { Sort } from '../src/Query/Sort';
-import { StatusRegistry } from '../src/StatusRegistry';
-import { StatusConfiguration, StatusType } from '../src/StatusConfiguration';
-import { SampleTasks, fromLine, fromLines, toLines } from './TestHelpers';
-import { TaskBuilder } from './TestingTools/TaskBuilder';
-import { sortBy } from './TestingTools/SortingTestHelpers';
-import { verifyWithFileExtension } from './TestingTools/ApprovalTestHelpers';
+import type { Comparator } from '../../../src/Query/Sort/Sorter';
+import { Sorter } from '../../../src/Query/Sort/Sorter';
+import { Task } from '../../../src/Task/Task';
+import { StatusField } from '../../../src/Query/Filter/StatusField';
+import { DueDateField } from '../../../src/Query/Filter/DueDateField';
+import { PathField } from '../../../src/Query/Filter/PathField';
+import { SearchInfo } from '../../../src/Query/SearchInfo';
+import { Sort } from '../../../src/Query/Sort/Sort';
+import { StatusRegistry } from '../../../src/Statuses/StatusRegistry';
+import { StatusConfiguration, StatusType } from '../../../src/Statuses/StatusConfiguration';
+import { SampleTasks, fromLine, fromLines, toLines } from '../../TestingTools/TestHelpers';
+import { TaskBuilder } from '../../TestingTools/TaskBuilder';
+import { sortBy } from '../../TestingTools/SortingTestHelpers';
+import { verifyWithFileExtension } from '../../TestingTools/ApprovalTestHelpers';
 
 const longAgo = '2022-01-01';
 const yesterday = '2022-01-14';
diff --git a/tests/TaskFieldRenderer.test.ts b/tests/Renderer/TaskFieldRenderer.test.ts
similarity index 95%
rename from tests/TaskFieldRenderer.test.ts
rename to tests/Renderer/TaskFieldRenderer.test.ts
index b28c9080..5bd603d1 100644
--- a/tests/TaskFieldRenderer.test.ts
+++ b/tests/Renderer/TaskFieldRenderer.test.ts
@@ -2,8 +2,8 @@
  * @jest-environment jsdom
  */
 import moment from 'moment';
-import { TaskFieldHTMLData, TaskFieldRenderer } from '../src/TaskFieldRenderer';
-import { TaskBuilder } from './TestingTools/TaskBuilder';
+import { TaskFieldHTMLData, TaskFieldRenderer } from '../../src/Renderer/TaskFieldRenderer';
+import { TaskBuilder } from '../TestingTools/TaskBuilder';
 
 window.moment = moment;
 
diff --git a/tests/TaskLineRenderer.test.Visualise_HTML_Full_task_-_full_mode.approved.html b/tests/Renderer/TaskLineRenderer.test.Visualise_HTML_Full_task_-_full_mode.approved.html
similarity index 100%
rename from tests/TaskLineRenderer.test.Visualise_HTML_Full_task_-_full_mode.approved.html
rename to tests/Renderer/TaskLineRenderer.test.Visualise_HTML_Full_task_-_full_mode.approved.html
diff --git a/tests/TaskLineRenderer.test.Visualise_HTML_Full_task_-_short_mode.approved.html b/tests/Renderer/TaskLineRenderer.test.Visualise_HTML_Full_task_-_short_mode.approved.html
similarity index 100%
rename from tests/TaskLineRenderer.test.Visualise_HTML_Full_task_-_short_mode.approved.html
rename to tests/Renderer/TaskLineRenderer.test.Visualise_HTML_Full_task_-_short_mode.approved.html
diff --git a/tests/TaskLineRenderer.test.Visualise_HTML_Minimal_task_-_full_mode.approved.html b/tests/Renderer/TaskLineRenderer.test.Visualise_HTML_Minimal_task_-_full_mode.approved.html
similarity index 100%
rename from tests/TaskLineRenderer.test.Visualise_HTML_Minimal_task_-_full_mode.approved.html
rename to tests/Renderer/TaskLineRenderer.test.Visualise_HTML_Minimal_task_-_full_mode.approved.html
diff --git a/tests/TaskLineRenderer.test.Visualise_HTML_Minimal_task_-_short_mode.approved.html b/tests/Renderer/TaskLineRenderer.test.Visualise_HTML_Minimal_task_-_short_mode.approved.html
similarity index 100%
rename from tests/TaskLineRenderer.test.Visualise_HTML_Minimal_task_-_short_mode.approved.html
rename to tests/Renderer/TaskLineRenderer.test.Visualise_HTML_Minimal_task_-_short_mode.approved.html
diff --git a/tests/TaskLineRenderer.test.ts b/tests/Renderer/TaskLineRenderer.test.ts
similarity index 96%
rename from tests/TaskLineRenderer.test.ts
rename to tests/Renderer/TaskLineRenderer.test.ts
index 625c4221..277a55aa 100644
--- a/tests/TaskLineRenderer.test.ts
+++ b/tests/Renderer/TaskLineRenderer.test.ts
@@ -2,20 +2,20 @@
  * @jest-environment jsdom
  */
 import moment from 'moment';
-import { DebugSettings } from '../src/Config/DebugSettings';
-import { GlobalFilter } from '../src/Config/GlobalFilter';
-import { resetSettings, updateSettings } from '../src/Config/Settings';
-import { TaskLayoutOptions } from '../src/Layout/TaskLayoutOptions';
-import { DateParser } from '../src/Query/DateParser';
-import { QueryLayoutOptions } from '../src/QueryLayoutOptions';
-import type { Task } from '../src/Task';
-import { TaskRegularExpressions } from '../src/Task';
-import { type TaskLayoutComponent, taskLayoutComponents } from '../src/TaskLayout';
-import type { TextRenderer } from '../src/TaskLineRenderer';
-import { TaskLineRenderer } from '../src/TaskLineRenderer';
-import { fromLine } from './TestHelpers';
-import { verifyWithFileExtension } from './TestingTools/ApprovalTestHelpers';
-import { TaskBuilder } from './TestingTools/TaskBuilder';
+import { DebugSettings } from '../../src/Config/DebugSettings';
+import { GlobalFilter } from '../../src/Config/GlobalFilter';
+import { resetSettings, updateSettings } from '../../src/Config/Settings';
+import { TaskLayoutOptions } from '../../src/Layout/TaskLayoutOptions';
+import { DateParser } from '../../src/Query/DateParser';
+import { QueryLayoutOptions } from '../../src/Layout/QueryLayoutOptions';
+import type { Task } from '../../src/Task/Task';
+import { TaskRegularExpressions } from '../../src/Task/Task';
+import { type TaskLayoutComponent, taskLayoutComponents } from '../../src/Layout/TaskLayout';
+import type { TextRenderer } from '../../src/Renderer/TaskLineRenderer';
+import { TaskLineRenderer } from '../../src/Renderer/TaskLineRenderer';
+import { fromLine } from '../TestingTools/TestHelpers';
+import { verifyWithFileExtension } from '../TestingTools/ApprovalTestHelpers';
+import { TaskBuilder } from '../TestingTools/TaskBuilder';
 
 jest.mock('obsidian');
 window.moment = moment;
diff --git a/tests/Scripting/Postponer.test.ts b/tests/Scripting/Postponer.test.ts
index ffb3271f..dd4236b2 100644
--- a/tests/Scripting/Postponer.test.ts
+++ b/tests/Scripting/Postponer.test.ts
@@ -2,7 +2,7 @@
  * @jest-environment jsdom
  */
 import moment from 'moment';
-import type { Task } from 'Task';
+import type { Task } from '../../src/Task/Task';
 import {
     type HappensDate,
     createFixedDateTask,
@@ -14,8 +14,8 @@ import {
     postponementSuccessMessage,
     shouldShowPostponeButton,
 } from '../../src/Scripting/Postponer';
-import { Status } from '../../src/Status';
-import { StatusConfiguration, StatusType } from '../../src/StatusConfiguration';
+import { Status } from '../../src/Statuses/Status';
+import { StatusConfiguration, StatusType } from '../../src/Statuses/StatusConfiguration';
 import { TaskBuilder } from '../TestingTools/TaskBuilder';
 
 window.moment = moment;
diff --git a/tests/Scripting/ScriptingReference/CustomFiltering/CustomFilteringExamples.test.ts b/tests/Scripting/ScriptingReference/CustomFiltering/CustomFilteringExamples.test.ts
index 2a9d5c3e..fbc21836 100644
--- a/tests/Scripting/ScriptingReference/CustomFiltering/CustomFilteringExamples.test.ts
+++ b/tests/Scripting/ScriptingReference/CustomFiltering/CustomFilteringExamples.test.ts
@@ -3,15 +3,15 @@
  */
 
 import moment from 'moment';
-import type { Task } from '../../../../src/Task';
-import { SampleTasks, fromLine, fromLines } from '../../../TestHelpers';
+import type { Task } from '../../../../src/Task/Task';
+import { SampleTasks, fromLine, fromLines } from '../../../TestingTools/TestHelpers';
 import type { CustomPropertyDocsTestData, QueryInstructionLineAndDescription } from '../VerifyFunctionFieldSamples';
 import {
     verifyFunctionFieldFilterSamplesForDocs,
     verifyFunctionFieldFilterSamplesOnTasks,
 } from '../VerifyFunctionFieldSamples';
-import { StatusRegistry } from '../../../../src/StatusRegistry';
-import { StatusConfiguration } from '../../../../src/StatusConfiguration';
+import { StatusRegistry } from '../../../../src/Statuses/StatusRegistry';
+import { StatusConfiguration } from '../../../../src/Statuses/StatusConfiguration';
 
 window.moment = moment;
 
diff --git a/tests/Scripting/ScriptingReference/CustomGrouping/CustomGroupingExamples.test.ts b/tests/Scripting/ScriptingReference/CustomGrouping/CustomGroupingExamples.test.ts
index da233d17..0f6467a6 100644
--- a/tests/Scripting/ScriptingReference/CustomGrouping/CustomGroupingExamples.test.ts
+++ b/tests/Scripting/ScriptingReference/CustomGrouping/CustomGroupingExamples.test.ts
@@ -4,8 +4,8 @@
 
 import moment from 'moment';
 
-import type { Task } from '../../../../src/Task';
-import { SampleTasks } from '../../../TestHelpers';
+import type { Task } from '../../../../src/Task/Task';
+import { SampleTasks } from '../../../TestingTools/TestHelpers';
 import {
     type CustomPropertyDocsTestData,
     type QueryInstructionLineAndDescription,
diff --git a/tests/Scripting/ScriptingReference/CustomSorting/CustomSortingExamples.test.ts b/tests/Scripting/ScriptingReference/CustomSorting/CustomSortingExamples.test.ts
index e0fee678..c62d550a 100644
--- a/tests/Scripting/ScriptingReference/CustomSorting/CustomSortingExamples.test.ts
+++ b/tests/Scripting/ScriptingReference/CustomSorting/CustomSortingExamples.test.ts
@@ -3,8 +3,8 @@
  */
 
 import moment from 'moment';
-import type { Task } from '../../../../src/Task';
-import { SampleTasks, fromLine, fromLines } from '../../../TestHelpers';
+import type { Task } from '../../../../src/Task/Task';
+import { SampleTasks, fromLine, fromLines } from '../../../TestingTools/TestHelpers';
 import type { CustomPropertyDocsTestData, QueryInstructionLineAndDescription } from '../VerifyFunctionFieldSamples';
 import {
     verifyFunctionFieldFilterSamplesForDocs,
diff --git a/tests/Scripting/ScriptingReference/VerifyFunctionFieldSamples.ts b/tests/Scripting/ScriptingReference/VerifyFunctionFieldSamples.ts
index b1272b6a..ee85458d 100644
--- a/tests/Scripting/ScriptingReference/VerifyFunctionFieldSamples.ts
+++ b/tests/Scripting/ScriptingReference/VerifyFunctionFieldSamples.ts
@@ -1,14 +1,14 @@
 import { verifyAll } from 'approvals/lib/Providers/Jest/JestApprovals';
 import { FunctionField } from '../../../src/Query/Filter/FunctionField';
-import type { Task } from '../../../src/Task';
+import type { Task } from '../../../src/Task/Task';
 import { groupHeadingsForTask } from '../../CustomMatchers/CustomMatchersForGrouping';
 import { verifyMarkdownForDocs } from '../../TestingTools/VerifyMarkdown';
 import { expandPlaceholders } from '../../../src/Scripting/ExpandPlaceholders';
 import { makeQueryContext } from '../../../src/Scripting/QueryContext';
 import { scan } from '../../../src/Query/Scanner';
 import { SearchInfo } from '../../../src/Query/SearchInfo';
-import { Sort } from '../../../src/Query/Sort';
-import { toLines } from '../../TestHelpers';
+import { Sort } from '../../../src/Query/Sort/Sort';
+import { toLines } from '../../TestingTools/TestHelpers';
 
 /** For example, 'task.due' */
 type TaskPropertyName = string;
diff --git a/tests/Scripting/ScriptingTestHelpers.ts b/tests/Scripting/ScriptingTestHelpers.ts
index 6e167bb3..aa71b75e 100644
--- a/tests/Scripting/ScriptingTestHelpers.ts
+++ b/tests/Scripting/ScriptingTestHelpers.ts
@@ -1,5 +1,5 @@
 import moment from 'moment';
-import { TaskRegularExpressions } from '../../src/Task';
+import { TaskRegularExpressions } from '../../src/Task/Task';
 import { TasksDate } from '../../src/Scripting/TasksDate';
 
 export function formatToRepresentType(x: any): string {
diff --git a/tests/Scripting/TaskProperties.test.ts b/tests/Scripting/TaskProperties.test.ts
index 69d6a8c8..79eb75e7 100644
--- a/tests/Scripting/TaskProperties.test.ts
+++ b/tests/Scripting/TaskProperties.test.ts
@@ -3,7 +3,7 @@
  */
 
 import moment from 'moment';
-import { Status } from '../../src/Status';
+import { Status } from '../../src/Statuses/Status';
 
 import { TaskBuilder } from '../TestingTools/TaskBuilder';
 import { verifyMarkdownForDocs } from '../TestingTools/VerifyMarkdown';
diff --git a/tests/Status.test.ts b/tests/Statuses/Status.test.ts
similarity index 97%
rename from tests/Status.test.ts
rename to tests/Statuses/Status.test.ts
index e5110e8f..98203e23 100644
--- a/tests/Status.test.ts
+++ b/tests/Statuses/Status.test.ts
@@ -2,9 +2,9 @@
  * @jest-environment jsdom
  */
 import moment from 'moment';
-import { Status } from '../src/Status';
-import { StatusConfiguration, StatusType } from '../src/StatusConfiguration';
-import type { StatusCollectionEntry } from '../src/StatusCollection';
+import { Status } from '../../src/Statuses/Status';
+import { StatusConfiguration, StatusType } from '../../src/Statuses/StatusConfiguration';
+import type { StatusCollectionEntry } from '../../src/Statuses/StatusCollection';
 
 jest.mock('obsidian');
 window.moment = moment;
diff --git a/tests/StatusRegistry.test.ts b/tests/Statuses/StatusRegistry.test.ts
similarity index 97%
rename from tests/StatusRegistry.test.ts
rename to tests/Statuses/StatusRegistry.test.ts
index fb9c28ea..08ef825f 100644
--- a/tests/StatusRegistry.test.ts
+++ b/tests/Statuses/StatusRegistry.test.ts
@@ -2,15 +2,15 @@
  * @jest-environment jsdom
  */
 import moment from 'moment';
-import { StatusRegistry } from '../src/StatusRegistry';
-import { Status } from '../src/Status';
-import { StatusConfiguration, StatusType } from '../src/StatusConfiguration';
-import { Task } from '../src/Task';
-import { TaskLocation } from '../src/TaskLocation';
-import type { StatusCollection, StatusCollectionEntry } from '../src/StatusCollection';
-import * as TestHelpers from './TestHelpers';
-import * as StatusExamples from './TestingTools/StatusExamples';
-import { constructStatuses } from './TestingTools/StatusesTestHelpers';
+import { StatusRegistry } from '../../src/Statuses/StatusRegistry';
+import { Status } from '../../src/Statuses/Status';
+import { StatusConfiguration, StatusType } from '../../src/Statuses/StatusConfiguration';
+import { Task } from '../../src/Task/Task';
+import { TaskLocation } from '../../src/Task/TaskLocation';
+import type { StatusCollection, StatusCollectionEntry } from '../../src/Statuses/StatusCollection';
+import * as TestHelpers from '../TestingTools/TestHelpers';
+import * as StatusExamples from '../TestingTools/StatusExamples';
+import { constructStatuses } from '../TestingTools/StatusesTestHelpers';
 
 jest.mock('obsidian');
 window.moment = moment;
diff --git a/tests/StatusRegistryReport.test.StatusRegistryReport_should_create_a_report.approved.md b/tests/Statuses/StatusRegistryReport.test.StatusRegistryReport_should_create_a_report.approved.md
similarity index 100%
rename from tests/StatusRegistryReport.test.StatusRegistryReport_should_create_a_report.approved.md
rename to tests/Statuses/StatusRegistryReport.test.StatusRegistryReport_should_create_a_report.approved.md
diff --git a/tests/StatusRegistryReport.test.ts b/tests/Statuses/StatusRegistryReport.test.ts
similarity index 73%
rename from tests/StatusRegistryReport.test.ts
rename to tests/Statuses/StatusRegistryReport.test.ts
index bd7c51a2..e1fbb90d 100644
--- a/tests/StatusRegistryReport.test.ts
+++ b/tests/Statuses/StatusRegistryReport.test.ts
@@ -1,7 +1,7 @@
-import { createStatusRegistryReport } from '../src/StatusRegistryReport';
-import type { StatusCollection } from '../src/StatusCollection';
-import { verifyWithFileExtension } from './TestingTools/ApprovalTestHelpers';
-import { coreStatusesData, createStatuses } from './TestingTools/StatusesTestHelpers';
+import { createStatusRegistryReport } from '../../src/Statuses/StatusRegistryReport';
+import type { StatusCollection } from '../../src/Statuses/StatusCollection';
+import { verifyWithFileExtension } from '../TestingTools/ApprovalTestHelpers';
+import { coreStatusesData, createStatuses } from '../TestingTools/StatusesTestHelpers';
 
 describe('StatusRegistryReport', function () {
     it('should create a report', () => {
diff --git a/tests/StatusSettingsReport.test.StatusSettingsReport_should_include_problems_in_table.approved.md b/tests/Statuses/StatusSettingsReport.test.StatusSettingsReport_should_include_problems_in_table.approved.md
similarity index 100%
rename from tests/StatusSettingsReport.test.StatusSettingsReport_should_include_problems_in_table.approved.md
rename to tests/Statuses/StatusSettingsReport.test.StatusSettingsReport_should_include_problems_in_table.approved.md
diff --git a/tests/StatusSettingsReport.test.StatusSettingsReport_should_tabulate_StatusSettings.approved.md b/tests/Statuses/StatusSettingsReport.test.StatusSettingsReport_should_tabulate_StatusSettings.approved.md
similarity index 100%
rename from tests/StatusSettingsReport.test.StatusSettingsReport_should_tabulate_StatusSettings.approved.md
rename to tests/Statuses/StatusSettingsReport.test.StatusSettingsReport_should_tabulate_StatusSettings.approved.md
diff --git a/tests/StatusSettingsReport.test.ts b/tests/Statuses/StatusSettingsReport.test.ts
similarity index 77%
rename from tests/StatusSettingsReport.test.ts
rename to tests/Statuses/StatusSettingsReport.test.ts
index 67777077..89e232b6 100644
--- a/tests/StatusSettingsReport.test.ts
+++ b/tests/Statuses/StatusSettingsReport.test.ts
@@ -1,8 +1,8 @@
-import { StatusSettings } from '../src/Config/StatusSettings';
-import { tabulateStatusSettings } from '../src/StatusSettingsReport';
-import type { StatusCollection } from '../src/StatusCollection';
-import { verifyWithFileExtension } from './TestingTools/ApprovalTestHelpers';
-import { coreStatusesData, createStatuses } from './TestingTools/StatusesTestHelpers';
+import { StatusSettings } from '../../src/Config/StatusSettings';
+import { tabulateStatusSettings } from '../../src/Statuses/StatusSettingsReport';
+import type { StatusCollection } from '../../src/Statuses/StatusCollection';
+import { verifyWithFileExtension } from '../TestingTools/ApprovalTestHelpers';
+import { coreStatusesData, createStatuses } from '../TestingTools/StatusesTestHelpers';
 
 describe('StatusSettingsReport', () => {
     it('should tabulate StatusSettings', () => {
diff --git a/tests/StatusValidator.test.ts b/tests/Statuses/StatusValidator.test.ts
similarity index 97%
rename from tests/StatusValidator.test.ts
rename to tests/Statuses/StatusValidator.test.ts
index b5afc3f9..6ae207b5 100644
--- a/tests/StatusValidator.test.ts
+++ b/tests/Statuses/StatusValidator.test.ts
@@ -1,6 +1,6 @@
-import { StatusConfiguration, StatusType } from '../src/StatusConfiguration';
-import { StatusValidator } from '../src/StatusValidator';
-import type { StatusCollectionEntry } from '../src/StatusCollection';
+import { StatusConfiguration, StatusType } from '../../src/Statuses/StatusConfiguration';
+import { StatusValidator } from '../../src/Statuses/StatusValidator';
+import type { StatusCollectionEntry } from '../../src/Statuses/StatusCollection';
 
 describe('StatusValidator', () => {
     const statusValidator = new StatusValidator();
diff --git a/tests/DateFallback.test.ts b/tests/Task/DateFallback.test.ts
similarity index 97%
rename from tests/DateFallback.test.ts
rename to tests/Task/DateFallback.test.ts
index e1f00294..d1c64156 100644
--- a/tests/DateFallback.test.ts
+++ b/tests/Task/DateFallback.test.ts
@@ -3,11 +3,11 @@
  */
 import type { Moment } from 'moment';
 import moment from 'moment';
-import { Task } from '../src/Task';
-import { resetSettings, updateSettings } from '../src/Config/Settings';
-import { DateFallback } from '../src/DateFallback';
-import { TaskLocation } from '../src/TaskLocation';
-import { TaskBuilder } from './TestingTools/TaskBuilder';
+import { Task } from '../../src/Task/Task';
+import { resetSettings, updateSettings } from '../../src/Config/Settings';
+import { DateFallback } from '../../src/Task/DateFallback';
+import { TaskLocation } from '../../src/Task/TaskLocation';
+import { TaskBuilder } from '../TestingTools/TaskBuilder';
 
 jest.mock('obsidian');
 window.moment = moment;
diff --git a/tests/Recurrence.test.ts b/tests/Task/Recurrence.test.ts
similarity index 98%
rename from tests/Recurrence.test.ts
rename to tests/Task/Recurrence.test.ts
index d5b8f7a6..5664dc0d 100644
--- a/tests/Recurrence.test.ts
+++ b/tests/Task/Recurrence.test.ts
@@ -2,8 +2,8 @@
  * @jest-environment jsdom
  */
 import moment from 'moment';
-import { Recurrence } from '../src/Recurrence';
-import { RecurrenceBuilder } from './TestingTools/RecurrenceBuilder';
+import { Recurrence } from '../../src/Task/Recurrence';
+import { RecurrenceBuilder } from '../TestingTools/RecurrenceBuilder';
 
 window.moment = moment;
 
diff --git a/tests/Task.test.ts b/tests/Task/Task.test.ts
similarity index 98%
rename from tests/Task.test.ts
rename to tests/Task/Task.test.ts
index 3c796290..aff2eeb1 100644
--- a/tests/Task.test.ts
+++ b/tests/Task/Task.test.ts
@@ -2,17 +2,17 @@
  * @jest-environment jsdom
  */
 import moment from 'moment';
-import { Status } from '../src/Status';
-import { Priority, Task } from '../src/Task';
-import { resetSettings, updateSettings } from '../src/Config/Settings';
-import { GlobalFilter } from '../src/Config/GlobalFilter';
-import type { StatusCollection } from '../src/StatusCollection';
-import { StatusRegistry } from '../src/StatusRegistry';
-import { TaskLocation } from '../src/TaskLocation';
-import { StatusConfiguration, StatusType } from '../src/StatusConfiguration';
-import { fromLine } from './TestHelpers';
-import { TaskBuilder } from './TestingTools/TaskBuilder';
-import { RecurrenceBuilder } from './TestingTools/RecurrenceBuilder';
+import { Status } from '../../src/Statuses/Status';
+import { Priority, Task } from '../../src/Task/Task';
+import { resetSettings, updateSettings } from '../../src/Config/Settings';
+import { GlobalFilter } from '../../src/Config/GlobalFilter';
+import type { StatusCollection } from '../../src/Statuses/StatusCollection';
+import { StatusRegistry } from '../../src/Statuses/StatusRegistry';
+import { TaskLocation } from '../../src/Task/TaskLocation';
+import { StatusConfiguration, StatusType } from '../../src/Statuses/StatusConfiguration';
+import { fromLine } from '../TestingTools/TestHelpers';
+import { TaskBuilder } from '../TestingTools/TaskBuilder';
+import { RecurrenceBuilder } from '../TestingTools/RecurrenceBuilder';
 
 window.moment = moment;
 
diff --git a/tests/TaskDependency.test.ts b/tests/Task/TaskDependency.test.ts
similarity index 94%
rename from tests/TaskDependency.test.ts
rename to tests/Task/TaskDependency.test.ts
index 1dd00c70..cf02e388 100644
--- a/tests/TaskDependency.test.ts
+++ b/tests/Task/TaskDependency.test.ts
@@ -1,5 +1,10 @@
-import { addDependency, ensureTaskHasId, removeDependency, setDependenciesOnTasksWithIds } from '../src/TaskDependency';
-import { TaskBuilder } from './TestingTools/TaskBuilder';
+import {
+    addDependency,
+    ensureTaskHasId,
+    removeDependency,
+    setDependenciesOnTasksWithIds,
+} from '../../src/Task/TaskDependency';
+import { TaskBuilder } from '../TestingTools/TaskBuilder';
 
 describe('TaskDependency', () => {
     it('Should add id to task without id', () => {
diff --git a/tests/TaskLocation.test.ts b/tests/Task/TaskLocation.test.ts
similarity index 97%
rename from tests/TaskLocation.test.ts
rename to tests/Task/TaskLocation.test.ts
index e9dd1346..901f2dad 100644
--- a/tests/TaskLocation.test.ts
+++ b/tests/Task/TaskLocation.test.ts
@@ -1,4 +1,4 @@
-import { TaskLocation } from '../src/TaskLocation';
+import { TaskLocation } from '../../src/Task/TaskLocation';
 
 describe('TaskLocation', () => {
     it('should store the full task location', () => {
diff --git a/tests/Query/Urgency.test.ts b/tests/Task/Urgency.test.ts
similarity index 97%
rename from tests/Query/Urgency.test.ts
rename to tests/Task/Urgency.test.ts
index e4f8822b..45f520d7 100644
--- a/tests/Query/Urgency.test.ts
+++ b/tests/Task/Urgency.test.ts
@@ -4,10 +4,10 @@
 
 import moment from 'moment';
 import { TaskBuilder } from '../TestingTools/TaskBuilder';
-import { Urgency } from '../../src/Urgency';
-import { Priority } from '../../src/Task';
+import { Urgency } from '../../src/Task/Urgency';
+import { Priority } from '../../src/Task/Task';
 import { calculateRelativeDate } from '../TestingTools/DateTestHelpers';
-import { fromLine } from '../TestHelpers';
+import { fromLine } from '../TestingTools/TestHelpers';
 
 window.moment = moment;
 
diff --git a/tests/TaskSerializer/DataviewTaskSerializer.test.ts b/tests/TaskSerializer/DataviewTaskSerializer.test.ts
index 7b45fb0f..6eb4ee8b 100644
--- a/tests/TaskSerializer/DataviewTaskSerializer.test.ts
+++ b/tests/TaskSerializer/DataviewTaskSerializer.test.ts
@@ -2,11 +2,11 @@
  * @jest-environment jsdom
  */
 import moment from 'moment';
-import { Priority } from '../../src/Task';
+import { Priority } from '../../src/Task/Task';
 import { RecurrenceBuilder } from '../TestingTools/RecurrenceBuilder';
 import { TaskBuilder } from '../TestingTools/TaskBuilder';
 import { DATAVIEW_SYMBOLS, DataviewTaskSerializer } from '../../src/TaskSerializer/DataviewTaskSerializer';
-import type { Task } from '../../src/Task';
+import type { Task } from '../../src/Task/Task';
 import type { TaskDetails } from '../../src/TaskSerializer';
 
 jest.mock('obsidian');
diff --git a/tests/TaskSerializer/DefaultTaskSerializer.test.ts b/tests/TaskSerializer/DefaultTaskSerializer.test.ts
index a24547b3..b80903a2 100644
--- a/tests/TaskSerializer/DefaultTaskSerializer.test.ts
+++ b/tests/TaskSerializer/DefaultTaskSerializer.test.ts
@@ -2,7 +2,7 @@
  * @jest-environment jsdom
  */
 import moment from 'moment';
-import { Priority } from '../../src/Task';
+import { Priority } from '../../src/Task/Task';
 import type { Settings } from '../../src/Config/Settings';
 import { DefaultTaskSerializer } from '../../src/TaskSerializer';
 import { RecurrenceBuilder } from '../TestingTools/RecurrenceBuilder';
diff --git a/tests/TaskSerializer/DocsSamplesForTaskFormats.test.ts b/tests/TaskSerializer/DocsSamplesForTaskFormats.test.ts
index 7ef0fcae..caf2185b 100644
--- a/tests/TaskSerializer/DocsSamplesForTaskFormats.test.ts
+++ b/tests/TaskSerializer/DocsSamplesForTaskFormats.test.ts
@@ -6,7 +6,7 @@ import moment from 'moment';
 
 import { TASK_FORMATS, resetSettings, updateSettings } from '../../src/Config/Settings';
 import { verifyMarkdown, verifyMarkdownForDocs } from '../TestingTools/VerifyMarkdown';
-import { SampleTasks } from '../TestHelpers';
+import { SampleTasks } from '../TestingTools/TestHelpers';
 
 window.moment = moment;
 
diff --git a/tests/TaskSerializer/TaskSerializer.test.ts b/tests/TaskSerializer/TaskSerializer.test.ts
index 2faa5e0f..3ecbe1d2 100644
--- a/tests/TaskSerializer/TaskSerializer.test.ts
+++ b/tests/TaskSerializer/TaskSerializer.test.ts
@@ -3,7 +3,7 @@
  */
 
 import moment from 'moment';
-import { Priority, Task, TaskRegularExpressions } from '../../src/Task';
+import { Priority, Task, TaskRegularExpressions } from '../../src/Task/Task';
 import type { TaskDetails, TaskSerializer } from '../../src/TaskSerializer';
 import { TaskBuilder } from '../TestingTools/TaskBuilder';
 
diff --git a/tests/TestingTools/ApprovalTestHelpers.ts b/tests/TestingTools/ApprovalTestHelpers.ts
index ed94dff0..4f60c4a1 100644
--- a/tests/TestingTools/ApprovalTestHelpers.ts
+++ b/tests/TestingTools/ApprovalTestHelpers.ts
@@ -4,7 +4,7 @@ import type { GlobalFilter } from '../../src/Config/GlobalFilter';
 import type { GlobalQuery } from '../../src/Config/GlobalQuery';
 import { Query } from '../../src/Query/Query';
 import { explainResults } from '../../src/lib/QueryRendererHelper';
-import type { Task } from '../../src/Task';
+import type { Task } from '../../src/Task/Task';
 import { verifyMarkdown } from './VerifyMarkdown';
 
 export function printIteration<T1>(func: <T1>(t1: T1) => any, params1: T1[]): string {
diff --git a/tests/TestingTools/FilterTestHelpers.ts b/tests/TestingTools/FilterTestHelpers.ts
index 1d7b4ebe..ede4cdbc 100644
--- a/tests/TestingTools/FilterTestHelpers.ts
+++ b/tests/TestingTools/FilterTestHelpers.ts
@@ -1,7 +1,7 @@
 import type { FilterOrErrorMessage } from '../../src/Query/Filter/FilterOrErrorMessage';
-import { Task } from '../../src/Task';
+import { Task } from '../../src/Task/Task';
 import { Query } from '../../src/Query/Query';
-import { TaskLocation } from '../../src/TaskLocation';
+import { TaskLocation } from '../../src/Task/TaskLocation';
 import { SearchInfo } from '../../src/Query/SearchInfo';
 import type { TaskBuilder } from './TaskBuilder';
 
diff --git a/tests/TestingTools/RecurrenceBuilder.ts b/tests/TestingTools/RecurrenceBuilder.ts
index bced5612..39338607 100644
--- a/tests/TestingTools/RecurrenceBuilder.ts
+++ b/tests/TestingTools/RecurrenceBuilder.ts
@@ -1,6 +1,6 @@
 // Builder
 import type { Moment } from 'moment';
-import { Recurrence } from '../../src/Recurrence';
+import { Recurrence } from '../../src/Task/Recurrence';
 import { DateParser } from '../../src/Query/DateParser';
 
 /**
diff --git a/tests/TestingTools/SortingTestHelpers.ts b/tests/TestingTools/SortingTestHelpers.ts
index ae594004..5b47bd93 100644
--- a/tests/TestingTools/SortingTestHelpers.ts
+++ b/tests/TestingTools/SortingTestHelpers.ts
@@ -1,6 +1,6 @@
-import type { Sorter } from '../../src/Query/Sorter';
-import type { Task } from '../../src/Task';
-import { Sort } from '../../src/Query/Sort';
+import type { Sorter } from '../../src/Query/Sort/Sorter';
+import type { Task } from '../../src/Task/Task';
+import { Sort } from '../../src/Query/Sort/Sort';
 import { SearchInfo } from '../../src/Query/SearchInfo';
 
 export function sortBy(sorters: Sorter[], tasks: Task[]) {
diff --git a/tests/TestingTools/StatusExamples.ts b/tests/TestingTools/StatusExamples.ts
index e88c889e..e659919e 100644
--- a/tests/TestingTools/StatusExamples.ts
+++ b/tests/TestingTools/StatusExamples.ts
@@ -1,4 +1,4 @@
-import type { StatusCollection } from '../../src/StatusCollection';
+import type { StatusCollection } from '../../src/Statuses/StatusCollection';
 
 export function doneTogglesToCancelled() {
     const statuses: StatusCollection = [
diff --git a/tests/TestingTools/StatusesTestHelpers.ts b/tests/TestingTools/StatusesTestHelpers.ts
index 88892bcc..6f2da113 100644
--- a/tests/TestingTools/StatusesTestHelpers.ts
+++ b/tests/TestingTools/StatusesTestHelpers.ts
@@ -1,7 +1,7 @@
-import type { StatusCollection, StatusCollectionEntry } from '../../src/StatusCollection';
+import type { StatusCollection, StatusCollectionEntry } from '../../src/Statuses/StatusCollection';
 import { StatusSettings } from '../../src/Config/StatusSettings';
-import { Status } from '../../src/Status';
-import { StatusRegistry } from '../../src/StatusRegistry';
+import { Status } from '../../src/Statuses/Status';
+import { StatusRegistry } from '../../src/Statuses/StatusRegistry';
 
 export const coreStatusesData: StatusCollection = [
     [' ', 'Todo', 'x', 'TODO'],
diff --git a/tests/TestingTools/TaskBuilder.test.ts b/tests/TestingTools/TaskBuilder.test.ts
index 33761bee..07bc8788 100644
--- a/tests/TestingTools/TaskBuilder.test.ts
+++ b/tests/TestingTools/TaskBuilder.test.ts
@@ -3,7 +3,7 @@
  */
 
 import moment from 'moment';
-import type { Task } from '../../src/Task';
+import type { Task } from '../../src/Task/Task';
 import { TaskBuilder } from './TaskBuilder';
 
 export {};
diff --git a/tests/TestingTools/TaskBuilder.ts b/tests/TestingTools/TaskBuilder.ts
index 7f82c933..57ff6ab9 100644
--- a/tests/TestingTools/TaskBuilder.ts
+++ b/tests/TestingTools/TaskBuilder.ts
@@ -1,11 +1,11 @@
 // Builder
 import type { Moment } from 'moment';
-import { Status } from '../../src/Status';
-import { Priority, Task } from '../../src/Task';
-import { Recurrence } from '../../src/Recurrence';
+import { Status } from '../../src/Statuses/Status';
+import { Priority, Task } from '../../src/Task/Task';
+import { Recurrence } from '../../src/Task/Recurrence';
 import { DateParser } from '../../src/Query/DateParser';
-import { StatusConfiguration, StatusType } from '../../src/StatusConfiguration';
-import { TaskLocation } from '../../src/TaskLocation';
+import { StatusConfiguration, StatusType } from '../../src/Statuses/StatusConfiguration';
+import { TaskLocation } from '../../src/Task/TaskLocation';
 
 /**
  * A fluent class for creating tasks for tests.
diff --git a/tests/TestHelpers.ts b/tests/TestingTools/TestHelpers.ts
similarity index 96%
rename from tests/TestHelpers.ts
rename to tests/TestingTools/TestHelpers.ts
index b70f8ac4..650f5172 100644
--- a/tests/TestHelpers.ts
+++ b/tests/TestingTools/TestHelpers.ts
@@ -1,10 +1,10 @@
-import { Priority, Task } from '../src/Task';
-import { TaskLocation } from '../src/TaskLocation';
-import { PriorityTools } from '../src/lib/PriorityTools';
-import { Status } from '../src/Status';
-import { StatusType } from '../src/StatusConfiguration';
-import { Recurrence } from '../src/Recurrence';
-import { TaskBuilder } from './TestingTools/TaskBuilder';
+import { Priority, Task } from '../../src/Task/Task';
+import { TaskLocation } from '../../src/Task/TaskLocation';
+import { PriorityTools } from '../../src/lib/PriorityTools';
+import { Status } from '../../src/Statuses/Status';
+import { StatusType } from '../../src/Statuses/StatusConfiguration';
+import { Recurrence } from '../../src/Task/Recurrence';
+import { TaskBuilder } from './TaskBuilder';
 
 export function fromLine({
     line,
diff --git a/tests/TestingTools/VerifyStatuses.ts b/tests/TestingTools/VerifyStatuses.ts
index c8f23431..7a7c92be 100644
--- a/tests/TestingTools/VerifyStatuses.ts
+++ b/tests/TestingTools/VerifyStatuses.ts
@@ -1,16 +1,16 @@
 import { verify } from 'approvals/lib/Providers/Jest/JestApprovals';
-import { getPrintableSymbol } from '../../src/StatusRegistryReport';
-import type { Status } from '../../src/Status';
+import { getPrintableSymbol } from '../../src/Statuses/StatusRegistryReport';
+import type { Status } from '../../src/Statuses/Status';
 import { MarkdownTable } from '../../src/lib/MarkdownTable';
-import type { Task } from '../../src/Task';
+import type { Task } from '../../src/Task/Task';
 import type { FilterOrErrorMessage } from '../../src/Query/Filter/FilterOrErrorMessage';
 import { SearchInfo } from '../../src/Query/SearchInfo';
 import * as FilterParser from '../../src/Query/FilterParser';
-import type { GrouperFunction } from '../../src/Query/Grouper';
+import type { GrouperFunction } from '../../src/Query/Group/Grouper';
 import { StatusField } from '../../src/Query/Filter/StatusField';
 import { StatusTypeField } from '../../src/Query/Filter/StatusTypeField';
 import { StatusNameField } from '../../src/Query/Filter/StatusNameField';
-import { StatusRegistry } from '../../src/StatusRegistry';
+import { StatusRegistry } from '../../src/Statuses/StatusRegistry';
 import { TaskBuilder } from './TaskBuilder';
 import { verifyMarkdownForDocs } from './VerifyMarkdown';
 import { verifyWithFileExtension } from './ApprovalTestHelpers';
diff --git a/tests/DateAbbreviations.test.ts b/tests/lib/DateAbbreviations.test.ts
similarity index 93%
rename from tests/DateAbbreviations.test.ts
rename to tests/lib/DateAbbreviations.test.ts
index 317bb52c..64527400 100644
--- a/tests/DateAbbreviations.test.ts
+++ b/tests/lib/DateAbbreviations.test.ts
@@ -1,4 +1,4 @@
-import { doAutocomplete } from '../src/DateAbbreviations';
+import { doAutocomplete } from '../../src/lib/DateAbbreviations';
 
 describe('DateAbbreviations', () => {
     it('should expand abbreviations', () => {
diff --git a/tests/lib/PriorityTools.test.ts b/tests/lib/PriorityTools.test.ts
index dfb68e30..397a0308 100644
--- a/tests/lib/PriorityTools.test.ts
+++ b/tests/lib/PriorityTools.test.ts
@@ -1,4 +1,4 @@
-import { Priority } from '../../src/Task';
+import { Priority } from '../../src/Task/Task';
 import { PriorityTools } from '../../src/lib/PriorityTools';
 
 describe('priority naming', () => {
diff --git a/tests/ui/EditInstructions/PriorityInstructions.test.ts b/tests/ui/EditInstructions/PriorityInstructions.test.ts
index cf79cccd..1dfc28ef 100644
--- a/tests/ui/EditInstructions/PriorityInstructions.test.ts
+++ b/tests/ui/EditInstructions/PriorityInstructions.test.ts
@@ -1,5 +1,5 @@
 import { TaskBuilder } from '../../TestingTools/TaskBuilder';
-import { Priority } from '../../../src/Task';
+import { Priority } from '../../../src/Task/Task';
 import { SetPriority, allPriorityInstructions } from '../../../src/ui/EditInstructions/PriorityInstructions';
 
 describe('SetPriority', () => {
diff --git a/tests/ui/EditInstructions/StatusInstructions.test.ts b/tests/ui/EditInstructions/StatusInstructions.test.ts
index bfd99cf7..6dbddcf1 100644
--- a/tests/ui/EditInstructions/StatusInstructions.test.ts
+++ b/tests/ui/EditInstructions/StatusInstructions.test.ts
@@ -4,12 +4,12 @@
 
 import moment from 'moment/moment';
 
-import { Status } from '../../../src/Status';
+import { Status } from '../../../src/Statuses/Status';
 import { TaskBuilder } from '../../TestingTools/TaskBuilder';
 import { SetStatus, allStatusInstructions } from '../../../src/ui/EditInstructions/StatusInstructions';
 import * as StatusExamples from '../../TestingTools/StatusExamples';
 import { constructStatuses } from '../../TestingTools/StatusesTestHelpers';
-import { StatusRegistry } from '../../../src/StatusRegistry';
+import { StatusRegistry } from '../../../src/Statuses/StatusRegistry';
 
 window.moment = moment;
 
diff --git a/tests/EditTask.test.Exhaustive_editing_Edit_and_save_All_inputs.approved.txt b/tests/ui/EditTask.test.Exhaustive_editing_Edit_and_save_All_inputs.approved.txt
similarity index 100%
rename from tests/EditTask.test.Exhaustive_editing_Edit_and_save_All_inputs.approved.txt
rename to tests/ui/EditTask.test.Exhaustive_editing_Edit_and_save_All_inputs.approved.txt
diff --git a/tests/EditTask.test.ts b/tests/ui/EditTask.test.ts
similarity index 96%
rename from tests/EditTask.test.ts
rename to tests/ui/EditTask.test.ts
index 1f4e6ce5..0c2970bc 100644
--- a/tests/EditTask.test.ts
+++ b/tests/ui/EditTask.test.ts
@@ -4,15 +4,15 @@
 import { type RenderResult, fireEvent, render } from '@testing-library/svelte';
 import { describe, expect, it } from '@jest/globals';
 import moment from 'moment';
-import { taskFromLine } from '../src/Commands/CreateOrEditTaskParser';
-import type { Task } from '../src/Task';
-import EditTask from '../src/ui/EditTask.svelte';
-import { Status } from '../src/Status';
-import { DateFallback } from '../src/DateFallback';
-import { GlobalFilter } from '../src/Config/GlobalFilter';
-import { resetSettings, updateSettings } from '../src/Config/Settings';
-import { verifyAllCombinations3Async } from './TestingTools/CombinationApprovalsAsync';
-import { TaskBuilder } from './TestingTools/TaskBuilder';
+import { taskFromLine } from '../../src/Commands/CreateOrEditTaskParser';
+import type { Task } from '../../src/Task/Task';
+import EditTask from '../../src/ui/EditTask.svelte';
+import { Status } from '../../src/Statuses/Status';
+import { DateFallback } from '../../src/Task/DateFallback';
+import { GlobalFilter } from '../../src/Config/GlobalFilter';
+import { resetSettings, updateSettings } from '../../src/Config/Settings';
+import { verifyAllCombinations3Async } from '../TestingTools/CombinationApprovalsAsync';
+import { TaskBuilder } from '../TestingTools/TaskBuilder';
 
 window.moment = moment;
 const statusOptions: Status[] = [Status.DONE, Status.TODO];
diff --git a/tests/ui/Menus/MenuTestingHelpers.ts b/tests/ui/Menus/MenuTestingHelpers.ts
index 70baf08f..36df65c6 100644
--- a/tests/ui/Menus/MenuTestingHelpers.ts
+++ b/tests/ui/Menus/MenuTestingHelpers.ts
@@ -1,5 +1,5 @@
 import type { MenuItem } from '../../__mocks__/obsidian';
-import type { Task } from '../../../src/Task';
+import type { Task } from '../../../src/Task/Task';
 
 export function menuToString<MenuType>(menu: MenuType) {
     // @ts-expect-error TS2339: Property 'items' does not exist on type 'MenuType'.
diff --git a/tests/ui/Menus/PriorityMenu.test.ts b/tests/ui/Menus/PriorityMenu.test.ts
index 8b609968..9b72ccab 100644
--- a/tests/ui/Menus/PriorityMenu.test.ts
+++ b/tests/ui/Menus/PriorityMenu.test.ts
@@ -1,6 +1,6 @@
 import { PriorityMenu } from '../../../src/ui/Menus/PriorityMenu';
 import { TaskBuilder } from '../../TestingTools/TaskBuilder';
-import { Priority } from '../../../src/Task';
+import { Priority } from '../../../src/Task/Task';
 import { TestableTaskSaver, menuToString } from './MenuTestingHelpers';
 
 export {};
diff --git a/tests/ui/Menus/StatusMenu.test.ts b/tests/ui/Menus/StatusMenu.test.ts
index bc267d28..100fc570 100644
--- a/tests/ui/Menus/StatusMenu.test.ts
+++ b/tests/ui/Menus/StatusMenu.test.ts
@@ -6,11 +6,11 @@ import moment from 'moment';
 
 import { StatusMenu } from '../../../src/ui/Menus/StatusMenu';
 import { TaskBuilder } from '../../TestingTools/TaskBuilder';
-import { StatusRegistry } from '../../../src/StatusRegistry';
+import { StatusRegistry } from '../../../src/Statuses/StatusRegistry';
 import { StatusSettings } from '../../../src/Config/StatusSettings';
 import { resetSettings, updateSettings } from '../../../src/Config/Settings';
-import { StatusConfiguration, StatusType } from '../../../src/StatusConfiguration';
-import { Status } from '../../../src/Status';
+import { StatusConfiguration, StatusType } from '../../../src/Statuses/StatusConfiguration';
+import { Status } from '../../../src/Statuses/Status';
 import { TestableTaskSaver, menuToString } from './MenuTestingHelpers';
 
 window.moment = moment;