I will present two new ways to explore dark matter and dark energy. The first one introduces the possibility of very early structure formation, in which primordial dark matter halos form before recombination. These objects are a sort of intermediate between primordial black holes and ordinary dark matter subhalos and can induce several observable effects. In the second part, I will discuss how the 21cm line can offer unique constraints on modified gravity and dark energy at very high redshifts.