Added newInstance and newIsntaceWithContext for object creation.