fix compile errors
replace rakefile