Adding better injection support

some minor improvements to address issue #32