Add more efficient resource handling