Initial refactor of code to support multiple subjects and runs (in progress).