Cleaned up code to only use .xml