Updated lightmetrics

Best practices for 2014a and newer. Added extensive comments