Merge "Some refactoring of StaticLayout"