Fix issue #13
Added switch for programmatic injection.
Fixed issue #6