big revamp, sync from svn
sync from svn