Improved resource and exception management