Additional changes to support programming model. Also some temporal patches for debugging