changed principal metadata updating in single external function, cleand up some api doc
Merge pull request #59 from chruffer/principal_refactored

changed principal metadata updating in single external function, cleand ...