Slightly better doc loading.
Use the same function for initial load and updates.