Fixed Metrics
In process of cleaning code for readability.