Put all monitor stuff in main.js and nowhere else