Clean up code and added smart collections

* made the option setting of collection more clear
* added option for smart collection (untested implementation)