Reformatted and namespaced code