Changed initialising code to use namespaces