Tree expansion and multiscale analysis for KAM tori