refactored bamboo-api lib and updated tests