added resources, removed global references