Optimize deferred shape, better naming and jsdoc