Added presets functionality. Tidied up.