Added required tests in order to cover all cases.
Added dependency injection and tests (Not completed)
Completed dependency injection and made sure functional tests did not fail.

This implied going through all the required packages and adding
dependency injection to them. Now this works fine!