cleaned up the historical quotes code