Grid layout and refatoring.