Refactored global functions as protected static class functions