fixed some formatting for splitPatients and minor bugs