Refactored agilo business logic a bit and added tests for helper service.