Updated code section detector