refactored cloudbroker-bcl code to be more compartmentalised