minor commit

- added design doc
- replaced with a cleaner singleton implementation