Fixed CR issues: Docblock contents and styles, extracted 2 methods, fixed a bug  related to the wrong array key being read. Also made a tiny update to the tests.