Improve generic layout process