Fix warnings
Initial stab at dependency injection
Fix unit tests and ApplicationService instance counting
Constructor injection working