Added support for presets

Saving, loading and realling presets is now possible from code and via
gui