Clean spatial picture alloc code