Refactoring: removed unnecessary dependency on text module