Update code to add namespace and Facade pattern