Implement fetch mechanism

Still needs some work, but it's something and it includes some changes to the testing.
So I'm merging this early