Added basic xml read/write logic