Rearrange code that belongs to SWFRoot