Refactored to work with tasks and issues