Implementation of use previous trial
  Modified the function for choosing an existing study to make use of an optional function parameter
  Created backend implementation to retrieve previous trial data and update front end data

  Fixed problem in sending trial condition data to front end

  Code review : Daniel Jao