more flexible handling of roles and such;
parsing errors are now located