Updated all functions. Should perform the same functions as the ruby
bindings.
Minor bug fix: returning results.