refactored bamboo lib, bamboo-api and updated tests