B-mode polarisation is a powerful cosmological observable which in principle allows the detection of a stochastic background of gravitational waves predicted by inflation, and gives strong constraints on the neutrino sector using the weak gravitational lensing of the cosmic microwave background (CMB). Astrophysical foregrounds present a formidable obstacle in extracting these signatures of new physics from CMB polarisation data. Indeed, recent forecasts for post-2020 CMB experiments predict one sigma constraints on, for example, the tensor-to-scalar ratio of about 10^-4 and the sum of neutrino masses of about 30 meV. However, these constraints are predicated on highly-accurate foreground and noise removal. I will present the first component separation method specifically developed for this task and tested on the latest-release Planck data. The method, Spin-SILC, is an internal linear combination algorithm that uses spin wavelets to fully analyse the spin polarisation signal. This allows all the information in the measured signal to be used in extracting the cosmological background. Furthermore, Spin-SILC is the first method to simultaneously and efficiently perform component separation and the E-B decomposition necessary for cosmological analyses. We also use the morphological information of the foregrounds and CMB to better localise the cleaning algorithm, by employing directional wavelets. I will present the results of applying these novelties to Planck data and discuss further how Spin-SILC can also mitigate the E-B leakage problem of future CMB experiments.