Reworked configuration.

Uses objects, allows changing more options.