Cleanup for linked list AVs and many other small fixes