Fixed tests and samples to work with new from SW function.