Added disposal of resources