Added integration test and refactored for trello