Started list function and fixed some bugs