rearrange, remove major cruft