Comments. Removed variable redundancies

cap_op removed due to variable redundancy( m_loop = toupper(m_loop); )

Fixed indentations and added spaces for easier understanding.
Added comments on what code does.

I need to move the original inputs as temporary storages because the user should not see the reductions or calculations being done.