refactored mysql queries in custom rest module
made some ajax calls sync on role administration