Adds fixes for segment first/last, adds separate variables for attached/block header sizes