Refactoring: removed unnecessary functions