[XSP] Rewrote options' parsing code