Using MCNP5 code, we modeled an existing codedaperture, gamma-ray imaging system in order to optimize the thicknesses of its mask and detector elements. We also explored the feasibility of designing an active-mask version of the instrument where the lead elements of the mask are replaced by alkali-halide detectors. The results of these simulations indicate that increasing the detector thickness will improve the instrument's sensitivity, but, surprisingly, the active-mask system is only slightly more sensitive than the passive version.