Change static class to singleton