refactoring and preparing for interaction (bot-like) codebase