remove select method
remove redundant variable declarations
added isCompleted field for task class
Added in completed method, and removed redundant variables and methods