[Akash/Sailee] Refactoring the codebase