per-schema ui style, a better approach; fix memory leak.