Cleaned up doObject and modified tests