Some cleanup part 2
Some cleanup part 3