I'm closing this for now as the new module structure has been adapted. However, the chat code hasn't been separated yet, this will be done when the chat code is refactored.