Initialization and Updating working with both historical data and generated TA data. Code is still messy.