Caple completed homework

The sorts work but only after the list refresh. Needs fixing and styling. Taken from MVCtoDo and heavily adapted.