Remove old flatten code, use height generator variable instead