Fixed use of wrong variable.
Formatting.
Monitor enumeration fixes.