Moved monitor code to root dir