Merged latest changes from old svn trunk