Reworked the main struct into a package for easier testing
Added support for specifying the xml file as the first argument