Extracted manifest reading method. Added tests.