Refactored the task class
Created a model class