Add single pattern with initial tests.
Add singleton instance check to complete pattern
Refactoring and renaming.  Adding some comments for docs.