Makes the code for making preset a bit better.

There is still room for a lot of improvement, but I'm not going to put
much time into making it better until more important things are taken
care of.