optimization: moving class Monitor -> namespace Monitor