Some reformatting. Add write methods to repo interface. WIP