code cleanup on BotCore