Preferences improvements

Allow accessing preferences via attributes and add several small improvements (integrated docstrings, autocompletion support, etc.). Addresses the issues in #10