Further refactorings and test coverage increasment of content assist related stuff