Added getRate method and test, fix EOL

Sorry about the large PR, changed EOLs from CRLF to LF. Do you want me to bump version numbers?