Draft: [Misc] Organise source code in app/ and lib/
Description
This MR reorganises the code in app/ lib/ and tools/
Checklist
-
Documentation reflects the changes made. -
Merge Request title is clear, concise, and suitable as a changelog entry. See our contributing docs
References
Closes #1265