Handle isLoading on repository functions
Add more documentation