Fixed communication issues (and some other bugs and refactorings).