Ported from Makefile to Rakefile
Minor fixes