Apply proposed changes:
* Refactor options into properties instead of using the $options array.
* Use `iteratorToArray` if $list is not array in `setList($list)`

Also added some more tests for 100% coverage.