Added outputBuilder module and refactored ciMedian to use it.