fix XML writer start work on rules

TODO: Need to work on the advanced GUI in order to make things look
better on the gui!