Renamed _cls to _factory.
Example of autocompletion added.
Documentation added.