reworked css; moved legend element to UI class; prepared new css styles