Improved handling of multiple sets and added examples.