cleaned up things a bit, fixed a bug in TreeWorldCache checks