Some reshuffle and resource cleanup