Resource handling update. Things are still broken.