Renamed $target to $container to describe purpose
Removed extraneous $container variable