refactor: reorganize state management and update import paths across modules and start changing json parsing