Layout event handler now check the container size before laying out
Got rid of some parens