Multiton pattern implementation and painless management of singletons