Change encoding class to static class