DDF-510: Added SubjectUtils class to help working with subjects.
Also fixed some xml formatting and cleaned up dependencies.