Added lazy code segment loading