Minor changes:Added JavaDocs, resolved generics and refactored PL JSON.