Added code and xml generation