[SERVDEV-39] Major refactoring that lead to performance improvements