Working on database refactor and scripts editing