Added API to get resource state (otherwise wouldn't be able to tell if async load failed).
Postprocessing clean up.