Moving the permission manager test to core module
Cleaning