class and namespace fixes