Core pr 4

Updated coding style and documentation.
Fixed magic weak-up function to fixes loading of object from cache.
Added new function ding_provider_build_entity_id to help with the new data-well PID's.