Defined a more advanced layout strategy. Code need refactor.