Core/RBAC: Fix mem leak
Core/Calendar: Fix mem leak and minor cosmetic changes