Implemented ok_slist_clear and fixed some memory leaks identified by valgrind.