Fixed makefile and rakefile and build