Implemented injecting in the ctor.

Signed-off-by: Paulo Pires <pjpires@gmail.com>