Minor changes for disposing of objects