Better error checking.
A little optimization

Though with the current state of KSP, it's mostly snakeoil, I expect.