Extracted descriptor enum.
Add javadoc and clean up code.