Discriminate between leading and lagging power factor. Closes #11