Fixed some bugs and updated the RDoc documentation.