[x] Code should be refactored for simplicity and efficiency, removing unnecessary libraries or functions and ensuring that the remaining code is clean and well-documented.
[x] The codebase should be easier to maintain after optimization, with clear documentation and a structure that facilitates future updates and bug fixes.
Acceptance criteria