Refactored getSubset() and getPrefix() methods to fix #1
Fixed some JavaDoc.