changed viewer layout, added add layer button, fixed legend