Added more configuration options.

Mostly finished configution application.
Added some interfaces for extension purposes.