refactored codebase and added missing dependencies into Bot