New Prepare/Run API logic implemented and tested

- Samples are updated

- This commit can be published as 1.0.5-rc