autoAllocate: more code compactifying (for fun)