Refactoring, add singleton