Tighter security checks on allowed entities and user roles and permissions, upped version to 0.0.2