fix valid method on Line model
refactor line model
add validations for task model
add line selection and deselection