Code cleanup and value fix

* Cleaned up syntax for mo' better concise code.
* Corrected the use of Sum to Aggregate