Add prefernce panel and other small improvement