Now controller looks a bit better and its parts can be tested with integration tests, that are going to be implemented later.