Freelist code converted to Processing