Adding back changes that were accidentlly removed + a few more things to clean-up