Refactor layoout.