Small tidy of code
Final fixes before the monitor PR