Added Settings class
Code refactoring. Fixed minor display issues