update svn plus small fixes

This updates the base code to current svn and applies some small fixes to the CMake-ification.