NODESCHOOL-79: Refactoring the old bits of code