Fixed rakefile and tests.