Created Category Managers and optimized data connection to the database, closing connections when errors happen