Renamed main to monitor