Updated code with working test class. Still need to add test code for power var plots