Some complex layout system improvements;
Fixed annoying warning in debug