fix bug
improve layout parser
alter repo factory