Added user interface settings support.
Some improvement an few bug busted.