Example of instantiating singletons and how to avoid some common pitfalls.