Refactorisation. Deactivateing runscript as this is broken atm.