Removed some unnecessary code, added namespace option to example