Changed use of the lineLayouts member to a local variable as much as possible. A few style corrections.