fix edit layout, finish category directive