added write to nexus code and starting to prepare for BEAST pipeline