I cleaned up and commented the listadd function.