Rebased pr 76

Be careful, after you update the branch, probably we will loose the comments embedded in the source code of the original e-ucm pull request.