#4 - restructure for repository persistence