Extract the current layouting code to separate function. This code will remain for...