Did some refactorings to prepare for adding networking