Code refactoring - removing unnecessary functions