Moved previous algorithms to new framework