Add preset validation. Add some more comments.