Issue 61. Improve ordering when injecting dependencies