XMCD Analysis implemented, Bugs still need to be fixed