-Added main panel
-refactoring