added upstream outline and TODO comments throughout