separate layout and drawing at top level, more instrumentation