Issue 249 refactor monitoring

Please review the code