Various: fixes, refactoring, started adding Chat_Bot.