First working version with xml and settings integration