more database work related to functionality and concurrency; refactored NewBot to be part of the botmanager