Further optimalisations & cleanups