Added unit tests to help explain predicament. NOT FOR PROD RELEASE !!