Added resources and attributes to stage files.

[NEW] Added resources and attributes to stage files. The resources
define the used resources in the stage and load them before the stage
started.