added config and some updates in layout algos