Beginning of new implementation to allow more fluent syntax. Samples updated for it.