Freelist refactoring, no functional changes