make clean, fix small errors, make beta 3.1