Fixes for deferred values
Refactor deferred array object
python 3 fixes