[XSP] Clean up main, use modern features