Code Cleanup: HrPw memory leak

.. delete arrays[]
.. small change to code formatting