Update rakefile to build tests and library. Also fixed a warning in the library