Making some more changes to AdaptiveScalarEncore and corresponding test as per David's review.