Started working on some refactoring and in particular trying to work out class responsibilities.