Removed unnecessary XML and some code from main