Cleaning XSP

Just some generic cleanup on the XSP code