Big refactor - separating data from algorithms and adding almost done scheduler