Fixed fetch to be async and use callbacks

This fixes #314