Tidied it up so that we inject dependencies into the Main class