Started to code the packaged resource system.

Also moved IPersistentData in the api package.