Added more CLB functionality and error handling