Updated to include main merge method(s). Should be functional, apart from final renaming of file. Bit of tidying up to do also.