More fixups for tree consolidation

Plus a new DEBUG_ASSETS setting to optionally not merge javascript files.