Anfonwch hwn fel neges destun: On the formation of dwarf galaxies and stellar haloes