Refactor dom object: Remove classList object, refactor classList functions,  add prev function