Right, the current method uses two extra vars that wouldn't be needed (`sheets` and `style`). Also using my suggestion does the same thing with less lines of code.

Right now you're doing "if it isn't there, make one" then later "if it is there, use it, otherwise grab the last one from `sheets`.  Seems much simpler to just use the one if it is there, otherwise create it, and you're done.