Merge "Add monitor related code"