restructure - separating model, view and tests