added skeleton code for history view and sequential tree abstract class
finished implementation of flatten, needs testing