code cleanup: introduced 'Action' and namespaces.