Adding API tests and functions
Additional RSpec tests for API