Add DI tests
Merge pull request #302 from stloyd/feature/di_test

Add DI tests & fix some issues
Merge branch '0.2'