Finished refactoring tests, refacotred completion controller to extract dependencies