Fixing tests, and making it more ruby friendly