Text this: Optimisation of nonlinear photonic devices: design of optical fibre spectra and plasmonic systems