extensive reorganization, better comments,

extensive reorganization, better comments, string metrics and utilities