Refactores code, improves DRYness and solves issue when sortable on new item